Skip to content

Commit fc64a16

Browse files
committed
[mlir] Use rewriter in linalg Detensorize
This is to allow rollbacks on failures of dialect lowering to succeed. Differential Revision: https://reviews.llvm.org/D115789
1 parent 834c8ff commit fc64a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class DetensorizeGenericOp : public OpConversionPattern<GenericOp> {
7373

7474
// Split the op's region before the op. This way, we have a clear insertion
7575
// point in which the op can be inlined.
76-
Block *newBlock = originalBlock->splitBlock(op);
76+
Block *newBlock = rewriter.splitBlock(originalBlock, Block::iterator(op));
7777
rewriter.inlineRegionBefore(op.region(), newBlock);
7878
// Now that op's region is inlined, the operands of its YieldOp are mapped
7979
// to the materialized target values. Therefore, we can replace the op's

0 commit comments

Comments
 (0)