Introduce the execute_region op that is able to hold a region which it
executes exactly once. The op encapsulates a CFG within itself while
isolating it from the surrounding control flow. The proposal on this was
- execute_region enables one to inline a function without lowering out all other higher level control flow constructs (affine.for/if, loop.for/if) to the flat list of blocks / std CFG form. It thus allows the benefit of transforms on higher level control flow ops available in the presence of the inlined calls. The inlined calls continue to benefit from propagation of SSA values across their top boundary. Functions won’t have to remain outlined until later than desired.
- Abstractions like affine grayboxes, lambdas with implicit captures could be lowered to this without first lowering out structured loops/ifs or outlining. But two early use cases are of: (1) an early inliner (which can inline functions by introducing execute_region ops), (2) lowering of an affine.graybox, which nicely maps to an execute_region when going from the affine dialect to the loop dialect.
Depends on D71961.
Signed-off-by: Uday Bondhugula <firstname.lastname@example.org>