Skip to content

Commit 9dda5b9

Browse files
matthias-springerAnthony Tran
authored andcommitted
[mlir][Transforms] Dialect Conversion: Simplify block-inline handling (llvm#145308)
When a block is getting inlined, the destination block does not have to be legalized. That's because the signature of the destination block does not change by inlining. This commit makes the implementation consistent with this comment: ``` // If the pattern moved or created any blocks, make sure the types of block // arguments get legalized. ```
1 parent 8f17b60 commit 9dda5b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Transforms/Utils/DialectConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ LogicalResult OperationLegalizer::legalizePatternBlockRewrites(
23012301
continue;
23022302
Block *block = rewrite->getBlock();
23032303
if (isa<BlockTypeConversionRewrite, EraseBlockRewrite,
2304-
ReplaceBlockArgRewrite>(rewrite))
2304+
ReplaceBlockArgRewrite, InlineBlockRewrite>(rewrite))
23052305
continue;
23062306
// Only check blocks outside of the current operation.
23072307
Operation *parentOp = block->getParentOp();

0 commit comments

Comments
 (0)