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/Utils/FoldUtils.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/Utils/FoldUtils.cpp')
-rw-r--r-- | mlir/lib/Transforms/Utils/FoldUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/Utils/FoldUtils.cpp b/mlir/lib/Transforms/Utils/FoldUtils.cpp index 719c6fac731..a96545c0b24 100644 --- a/mlir/lib/Transforms/Utils/FoldUtils.cpp +++ b/mlir/lib/Transforms/Utils/FoldUtils.cpp @@ -97,7 +97,7 @@ LogicalResult OperationFolder::tryToFold( // Otherwise, replace all of the result values and erase the operation. for (unsigned i = 0, e = results.size(); i != e; ++i) - op->getResult(i)->replaceAllUsesWith(results[i]); + op->getResult(i).replaceAllUsesWith(results[i]); op->erase(); return success(); } @@ -120,7 +120,7 @@ void OperationFolder::notifyRemoval(Operation *op) { auto &uniquedConstants = foldScopes[getInsertionRegion(interfaces, op)]; // Erase all of the references to this operation. - auto type = op->getResult(0)->getType(); + auto type = op->getResult(0).getType(); for (auto *dialect : it->second) uniquedConstants.erase(std::make_tuple(dialect, constValue, type)); referencedDialects.erase(it); @@ -182,7 +182,7 @@ LogicalResult OperationFolder::tryToFold( Attribute attrRepl = foldResults[i].get<Attribute>(); if (auto *constOp = tryGetOrCreateConstant(uniquedConstants, dialect, builder, attrRepl, - res->getType(), op->getLoc())) { + res.getType(), op->getLoc())) { results.push_back(constOp->getResult(0)); continue; } |