Do not inline IR with multiple blocks into ops that may not support unstructured control flow.
This fixes #64978.
Depends On: D159078
Paths
| Differential D159072
[mlir][Transforms] Inliner: Extra checks for unstructured control flow ClosedPublic Authored by springerm on Aug 29 2023, 2:08 AM.
Details Summary Do not inline IR with multiple blocks into ops that may not support unstructured control flow. This fixes #64978. Depends On: D159078
Diff Detail
Event TimelineComment Actions I guess you're lookin into the SingleBlockRegion trait still?
Comment Actions
Yes, I'm waiting for comments on the Discourse post, then will update this revision. springerm added a parent revision: D159078: [mlir][IR] SingleBlockImplicitTerminator: Declare "inherited" trait in ODS instead of C++. This revision is now accepted and ready to land.Aug 29 2023, 8:05 AM Closed by commit rG8dd8c4adba79: [mlir][Transforms] Inliner: Extra checks for unstructured control flow (authored by springerm). · Explain WhyAug 30 2023, 6:37 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 554215 mlir/lib/Transforms/Inliner.cpp
mlir/test/Transforms/inlining.mlir
|
.size() is O(N), you can probably try &targetRegion->front() != &targetRegion->back() ?
(I don't know if we have a guarantee that targetRegion is not empty?)