Over the past year a lot of great effort has been made in the process of splitting and killing the standard dialect. We are now down to 10 operations (well 9 if we can land D118202)! At this point, I’d like to pull people in so that we can hash out the last few steps in finally killing this beast.
The remaining operations (barring the one killed by D118202) are:
- AssertOp, BranchOp, CallOp, CallIndirectOp, CondBranchOp, ConstantOp(function reference), ConstantOp(unit attribute), ReturnOp, SelectOp, SwitchOp
There are a few obvious groups that stand out here:
^ Not entirely sure where this fits into anything that exists, but could be the start of something new?
- BranchOp, CallIndirectOp, CondBranchOp, SelectOp, SwitchOp
These are all generic-ish control flow/conditional operations. We’ve talked before about a potential
cf(Control Flow) dialect, and I think these would make a great fit for an initial starting set.
(Before anyone says “Hey wait a minute, SelectOp shouldn’t be there”, I’d like to point out the scf.If basically supports a region-based select, so ha… joking aside, we could also also move it to arith or somewhere else, not much of a preference)
- FuncOp, ReturnOp, CallOp, ConstantOp (function reference)
These are all operations that are hardcoded to interact with FuncOp. There are a few ideas that we could explore here, for example:
CallOp(and I guess conceptually ReturnOp) could be updated allow referring to any FunctionOpInterface? and moved to a hypothetical
cf dialect. ConstantOp(function reference)/FuncOp/ReturnOp could be moved to what is currently SCF(likely after we clean up some weird dependencies in that dialect).
Note: FuncOp is currently
builtin (but shouldn’t be)
- ContantOp (UnitAttr)
This is unused in-tree and it isn’t obvious what semantics are supposed to be attached to this. I would propose that we just remove this behavior altogether.
We are so close to the end, let’s make one final push and end it once and for all! It would be nice if we can brainstorm in here what we think the final steps should be.