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/Analysis/Liveness.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/Analysis/Liveness.cpp')
-rw-r--r-- | mlir/lib/Analysis/Liveness.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mlir/lib/Analysis/Liveness.cpp b/mlir/lib/Analysis/Liveness.cpp index 7ba31365f1a..26e152dcdf7 100644 --- a/mlir/lib/Analysis/Liveness.cpp +++ b/mlir/lib/Analysis/Liveness.cpp @@ -45,7 +45,7 @@ struct BlockInfoBuilder { // properties of the program, the uses must occur after // the definition. Therefore, we do not have to check // additional conditions to detect an escaping value. - for (OpOperand &use : result->getUses()) + for (OpOperand &use : result.getUses()) if (use.getOwner()->getBlock() != block) { outValues.insert(result); break; @@ -171,15 +171,15 @@ Liveness::OperationListT Liveness::resolveLiveness(Value value) const { // Start with the defining block Block *currentBlock; - if (Operation *defOp = value->getDefiningOp()) + if (Operation *defOp = value.getDefiningOp()) currentBlock = defOp->getBlock(); else - currentBlock = value.cast<BlockArgument>()->getOwner(); + currentBlock = value.cast<BlockArgument>().getOwner(); toProcess.push_back(currentBlock); visited.insert(currentBlock); // Start with all associated blocks - for (OpOperand &use : value->getUses()) { + for (OpOperand &use : value.getUses()) { Block *useBlock = use.getOwner()->getBlock(); if (visited.insert(useBlock).second) toProcess.push_back(useBlock); @@ -269,12 +269,12 @@ void Liveness::print(raw_ostream &os) const { // Local printing helpers auto printValueRef = [&](Value value) { - if (Operation *defOp = value->getDefiningOp()) + if (Operation *defOp = value.getDefiningOp()) os << "val_" << defOp->getName(); else { auto blockArg = value.cast<BlockArgument>(); - os << "arg" << blockArg->getArgNumber() << "@" - << blockIds[blockArg->getOwner()]; + os << "arg" << blockArg.getArgNumber() << "@" + << blockIds[blockArg.getOwner()]; } os << " "; }; @@ -343,7 +343,7 @@ bool LivenessBlockInfo::isLiveOut(Value value) const { /// Gets the start operation for the given value /// (must be referenced in this block). Operation *LivenessBlockInfo::getStartOperation(Value value) const { - Operation *definingOp = value->getDefiningOp(); + Operation *definingOp = value.getDefiningOp(); // The given value is either live-in or is defined // in the scope of this block. if (isLiveIn(value) || !definingOp) @@ -361,7 +361,7 @@ Operation *LivenessBlockInfo::getEndOperation(Value value, // Resolve the last operation (must exist by definition). Operation *endOperation = startOperation; - for (OpOperand &use : value->getUses()) { + for (OpOperand &use : value.getUses()) { Operation *useOperation = use.getOwner(); // Check whether the use is in our block and after // the current end operation. |