diff options
author | Thomas Raoux <thomasraoux@google.com> | 2023-03-28 23:59:00 +0000 |
---|---|---|
committer | Thomas Raoux <thomasraoux@google.com> | 2023-03-28 23:59:45 +0000 |
commit | 1d448e1f24a8a44f9ab95c42945ef15cc63b48e7 (patch) | |
tree | 18b706509d4dfb2b2acbb5e6f323175d77b92c46 /mlir/lib/Dialect/SCF | |
parent | 0ceec3ebfcf339147f640dcb5c6d9f397c7bb502 (diff) | |
download | llvm-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.cpp | 2 |
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; |