diff options
author | River Riddle <riverriddle@google.com> | 2020-01-11 08:54:04 -0800 |
---|---|---|
committer | River Riddle <riverriddle@google.com> | 2020-01-11 08:54:39 -0800 |
commit | 2bdf33cc4c733342fc83081bc7410ac5e9a24f55 (patch) | |
tree | 3306d769c2bbabda1060928e0cea79d021ea9da2 /mlir/lib/Transforms/MemRefDataFlowOpt.cpp | |
parent | 1d641daf260308815d014d1bf1b424a1ed1e7277 (diff) | |
download | bcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.tar.gz bcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.zip |
[mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is properly value-typed.
Summary: These were temporary methods used to simplify the transition.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D72548
Diffstat (limited to 'mlir/lib/Transforms/MemRefDataFlowOpt.cpp')
-rw-r--r-- | mlir/lib/Transforms/MemRefDataFlowOpt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp index e2514e12cc7..4ac95822947 100644 --- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp +++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp @@ -93,7 +93,7 @@ void MemRefDataFlowOpt::forwardStoreToLoad(AffineLoadOp loadOp) { // all store ops. SmallVector<Operation *, 8> storeOps; unsigned minSurroundingLoops = getNestingDepth(*loadOpInst); - for (auto *user : loadOp.getMemRef()->getUsers()) { + for (auto *user : loadOp.getMemRef().getUsers()) { auto storeOp = dyn_cast<AffineStoreOp>(user); if (!storeOp) continue; @@ -206,18 +206,18 @@ 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. - Operation *defInst = memref->getDefiningOp(); + Operation *defInst = memref.getDefiningOp(); if (!defInst || !isa<AllocOp>(defInst)) // TODO(mlir-team): if the memref was returned by a 'call' operation, we // could still erase it if the call had no side-effects. continue; - if (llvm::any_of(memref->getUsers(), [&](Operation *ownerInst) { + if (llvm::any_of(memref.getUsers(), [&](Operation *ownerInst) { return (!isa<AffineStoreOp>(ownerInst) && !isa<DeallocOp>(ownerInst)); })) continue; // Erase all stores, the dealloc, and the alloc on the memref. - for (auto *user : llvm::make_early_inc_range(memref->getUsers())) + for (auto *user : llvm::make_early_inc_range(memref.getUsers())) user->erase(); defInst->erase(); } |