Skip to content

Commit 1d448e1

Browse files
committed
[mlir][bufferization] Use rewriter to erase ops in scf.forall bufferization.
Without this bufferization cannot track operations removed during bufferization. Unfortunately there is currently no way to enforce that ops need to be erased through the rewriter and this causes sporadic errors when tracking pointers in Bufferization pass. Therefore there is no easy way to test that the pattern is doing the right thing. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D147095
1 parent 0ceec3e commit 1d448e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ struct ForallOpInterface
10891089
forallOp.getMixedUpperBound(), forallOp.getMixedStep(),
10901090
/*outputs=*/ValueRange(), forallOp.getMapping());
10911091

1092-
newForallOp.getBody()->getTerminator()->erase();
1092+
rewriter.eraseOp(newForallOp.getBody()->getTerminator());
10931093

10941094
// Move over block contents of the old op.
10951095
SmallVector<Value> replacementBbArgs;

0 commit comments

Comments
 (0)