This trait is needed so that unstructured control flow is not inlined into "scf.while" ops.
Note: The two regions of "scf.while" are already defined as SizedRegion<1>. SingleBlock can be queried from C++, SizedRegion<n> not.
Fixes #64976.
Paths
| Differential D159199
[mlir][SCF] Add `SingleBlock` op trait to "scf.while" ClosedPublic Authored by springerm on Aug 30 2023, 6:56 AM.
Details Summary This trait is needed so that unstructured control flow is not inlined into "scf.while" ops. Note: The two regions of "scf.while" are already defined as SizedRegion<1>. SingleBlock can be queried from C++, SizedRegion<n> not. Fixes #64976.
Diff Detail
Event TimelineComment Actions LGTM other than the nitpick comment.
This revision is now accepted and ready to land.Aug 30 2023, 11:31 AM This revision was landed with ongoing or failed builds.Aug 31 2023, 12:05 AM Closed by commit rG4fdc019a8910: [mlir][SCF] Add `SingleBlock` op trait to "scf.while" (authored by springerm). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 554915 mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
mlir/test/Dialect/SCF/invalid.mlir
mlir/test/Transforms/inlining.mlir
|
Guess the 'func_with_block_args_location' is used here for its 'cf.br' rather than loc part.
Maybe create a new caller with better name for the purpose here?