summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp2
-rw-r--r--mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp4
-rw-r--r--mlir/lib/Dialect/AffineOps/AffineOps.cpp2
-rw-r--r--mlir/lib/Dialect/SPIRV/SPIRVOps.cpp2
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();
}
OpenPOWER on IntegriCloud