Sorry for the delay, past few days have been crazy…
Some pass by comments as I unpack the back and forths.
Not having an abstraction like this would mean that one is unable …
Could you please rephrase the triple negative?
because loop.for can only hold a single block while the callee could have multiple blocks.
Aren’t you overfitting on implementation details? It’s pretty easy to allow multiple regions in loop.for. In fact this structured control flow dialect is meant for such evolutions.
Note: I see this is proposed a bit later with also a canning proposal to “Region” instead of scf. This seems fine to me.
On the proposal itself: while I agree with the proposal and I am generally supportive of it I question the lack of arguments. Very concretely, to be generally useful for Linalg and other ops with regions that refuse to introduce SSA values prematurely (I.e. that use type information to encode the semantics and delay SSA value creation until inlining) you need both arguments and capture.
Can this be designed and implemented so it serves today’s needs that are already more general than “just capture”?