summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-03-26 17:05:09 -0700
committerjpienaar <jpienaar@google.com>2019-03-29 17:43:37 -0700
commitf9d91531df58a561a2c6e197dfb7cb796f7e44e3 (patch)
treed05d629f447360470856187ac47197695e915af3 /mlir/lib/Transforms/MemRefDataFlowOpt.cpp
parentd5259edefdc3d02eaf35970689f2c9cb17a0f855 (diff)
downloadbcm5719-llvm-f9d91531df58a561a2c6e197dfb7cb796f7e44e3.tar.gz
bcm5719-llvm-f9d91531df58a561a2c6e197dfb7cb796f7e44e3.zip
Replace usages of Instruction with Operation in the /IR directory.
This is step 2/N to renaming Instruction to Operation. PiperOrigin-RevId: 240459216
Diffstat (limited to 'mlir/lib/Transforms/MemRefDataFlowOpt.cpp')
-rw-r--r--mlir/lib/Transforms/MemRefDataFlowOpt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
index e1e253d1869..9779ab78a3f 100644
--- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
+++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
@@ -95,7 +95,7 @@ FunctionPassBase *mlir::createMemRefDataFlowOptPass() {
// this in the future if needed.
void MemRefDataFlowOpt::forwardStoreToLoad(LoadOp loadOp) {
Instruction *lastWriteStoreOp = nullptr;
- Instruction *loadOpInst = loadOp.getInstruction();
+ Instruction *loadOpInst = loadOp.getOperation();
// First pass over the use list to get minimum number of surrounding
// loops common between the load op and the store op, with min taken across
@@ -106,7 +106,7 @@ void MemRefDataFlowOpt::forwardStoreToLoad(LoadOp loadOp) {
auto storeOp = use.getOwner()->dyn_cast<StoreOp>();
if (!storeOp)
continue;
- auto *storeOpInst = storeOp.getInstruction();
+ auto *storeOpInst = storeOp.getOperation();
unsigned nsLoops = getNumCommonSurroundingLoops(*loadOpInst, *storeOpInst);
minSurroundingLoops = std::min(nsLoops, minSurroundingLoops);
storeOps.push_back(storeOpInst);
@@ -236,7 +236,7 @@ void MemRefDataFlowOpt::runOnFunction() {
// to do this as well, but we'll do it here since we collected these anyway.
for (auto *memref : memrefsToErase) {
// If the memref hasn't been alloc'ed in this function, skip.
- Instruction *defInst = memref->getDefiningInst();
+ Instruction *defInst = memref->getDefiningOp();
if (!defInst || !defInst->isa<AllocOp>())
// TODO(mlir-team): if the memref was returned by a 'call' instruction, we
// could still erase it if the call had no side-effects.
OpenPOWER on IntegriCloud