diff options
| author | Geoffrey Martin-Noble <gcmn@google.com> | 2019-10-19 06:03:50 -0700 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-10-19 06:04:18 -0700 |
| commit | bc577eaf441f06c879ae8cc2edb5b1fc2e05676c (patch) | |
| tree | e54a186f0fd2260aa93539bdc2708a14dc409bfc | |
| parent | c3e56cd12cf6d4ab3223d402370dc9236acd0f1b (diff) | |
| download | bcm5719-llvm-bc577eaf441f06c879ae8cc2edb5b1fc2e05676c.tar.gz bcm5719-llvm-bc577eaf441f06c879ae8cc2edb5b1fc2e05676c.zip | |
Use new eraseOp instead of replaceOp with empty values
PiperOrigin-RevId: 275631166
| -rw-r--r-- | mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp | 2 | ||||
| -rw-r--r-- | mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp | 4 | ||||
| -rw-r--r-- | mlir/lib/Dialect/AffineOps/AffineOps.cpp | 2 | ||||
| -rw-r--r-- | mlir/lib/Dialect/SPIRV/SPIRVOps.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp index 127349f6c9d..7e300fb702d 100644 --- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp @@ -100,7 +100,7 @@ public: ArrayRef<Value *>({formatSpecifierCst, elementLoad})); // Notify the rewriter that this operation has been removed. - rewriter.replaceOp(op, llvm::None); + rewriter.eraseOp(op); return matchSuccess(); } diff --git a/mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp b/mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp index 556a4934233..e8ab53b0f6f 100644 --- a/mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp +++ b/mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp @@ -211,7 +211,7 @@ ForLowering::matchAndRewrite(ForOp forOp, PatternRewriter &rewriter) const { ArrayRef<Value *>(), endBlock, ArrayRef<Value *>()); // Ok, we're done! - rewriter.replaceOp(forOp, {}); + rewriter.eraseOp(forOp); return matchSuccess(); } @@ -252,7 +252,7 @@ IfLowering::matchAndRewrite(IfOp ifOp, PatternRewriter &rewriter) const { /*falseArgs=*/ArrayRef<Value *>()); // Ok, we're done! - rewriter.replaceOp(ifOp, {}); + rewriter.eraseOp(ifOp); return matchSuccess(); } diff --git a/mlir/lib/Dialect/AffineOps/AffineOps.cpp b/mlir/lib/Dialect/AffineOps/AffineOps.cpp index 9980497640a..6d90464e632 100644 --- a/mlir/lib/Dialect/AffineOps/AffineOps.cpp +++ b/mlir/lib/Dialect/AffineOps/AffineOps.cpp @@ -1340,7 +1340,7 @@ struct AffineForEmptyLoopFolder : public OpRewritePattern<AffineForOp> { auto *body = forOp.getBody(); if (std::next(body->begin()) != body->end()) return matchFailure(); - rewriter.replaceOp(forOp, llvm::None); + rewriter.eraseOp(forOp); return matchSuccess(); } }; diff --git a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp index 85d106ed33e..b2ae902997a 100644 --- a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp @@ -2023,7 +2023,7 @@ struct SelectionOpCanonicalizer : public OpRewritePattern<spirv::SelectionOp> { selectOp.getResult(), storeOpAttributes); // `spv.selection` is not needed anymore. - rewriter.replaceOp(op, llvm::None); + rewriter.eraseOp(op); return matchSuccess(); } |

