Description
These two ops currently directly derive from CalyxPrimitiveOp, but they're not much more special than the other library ops. They're defined in the Calyx core primitive library here: https://github.com/cucapra/calyx/blob/cd6e4279a18e8f19ffba124a366defd0996548e9/primitives/core.futil#L27-L100.
One difference is I took the liberty of defining MemoryOp with a variadic number of ports that allow one op to represent any dimension of memory. If we implement this issue, that would go away, and there would be ops that map 1:1 to the Calyx primitives. Honestly that might be preferable, since a slight difference seems worse to me compared to total alignment.
At the least, I think we can make RegisterOp match its core primitive directly, by deriving CalyxLibraryOp. This should hopefully mean sharing more code now and in the long term.
Eventually, we plan to enhance the Calyx dialect to support defining primitives (#2923). This is orthogonal to that, but it seems good to think about and potentially address before any enhancements.