summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/SCF
diff options
context:
space:
mode:
authorThomas Raoux <thomasraoux@google.com>2023-03-28 23:59:00 +0000
committerThomas Raoux <thomasraoux@google.com>2023-03-28 23:59:45 +0000
commit1d448e1f24a8a44f9ab95c42945ef15cc63b48e7 (patch)
tree18b706509d4dfb2b2acbb5e6f323175d77b92c46 /mlir/lib/Dialect/SCF
parent0ceec3ebfcf339147f640dcb5c6d9f397c7bb502 (diff)
downloadllvm-1d448e1f24a8a44f9ab95c42945ef15cc63b48e7.tar.gz
[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
Diffstat (limited to 'mlir/lib/Dialect/SCF')
-rw-r--r--mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
index 91a7bb42e402..13f0d769ef4c 100644
--- a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
@@ -1089,7 +1089,7 @@ struct ForallOpInterface
forallOp.getMixedUpperBound(), forallOp.getMixedStep(),
/*outputs=*/ValueRange(), forallOp.getMapping());
- newForallOp.getBody()->getTerminator()->erase();
+ rewriter.eraseOp(newForallOp.getBody()->getTerminator());
// Move over block contents of the old op.
SmallVector<Value> replacementBbArgs;