summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/Utils/InliningUtils.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2020-01-11 08:54:04 -0800
committerRiver Riddle <riverriddle@google.com>2020-01-11 08:54:39 -0800
commit2bdf33cc4c733342fc83081bc7410ac5e9a24f55 (patch)
tree3306d769c2bbabda1060928e0cea79d021ea9da2 /mlir/lib/Transforms/Utils/InliningUtils.cpp
parent1d641daf260308815d014d1bf1b424a1ed1e7277 (diff)
downloadbcm5719-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/InliningUtils.cpp')
-rw-r--r--mlir/lib/Transforms/Utils/InliningUtils.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/mlir/lib/Transforms/Utils/InliningUtils.cpp b/mlir/lib/Transforms/Utils/InliningUtils.cpp
index 1ac286c67fb..64591209dce 100644
--- a/mlir/lib/Transforms/Utils/InliningUtils.cpp
+++ b/mlir/lib/Transforms/Utils/InliningUtils.cpp
@@ -199,8 +199,8 @@ LogicalResult mlir::inlineRegion(InlinerInterface &interface, Region *src,
// Otherwise, there were multiple blocks inlined. Add arguments to the post
// insertion block to represent the results to replace.
for (Value resultToRepl : resultsToReplace) {
- resultToRepl->replaceAllUsesWith(
- postInsertBlock->addArgument(resultToRepl->getType()));
+ resultToRepl.replaceAllUsesWith(
+ postInsertBlock->addArgument(resultToRepl.getType()));
}
/// Handle the terminators for each of the new blocks.
@@ -238,7 +238,7 @@ LogicalResult mlir::inlineRegion(InlinerInterface &interface, Region *src,
// Verify that the types of the provided values match the function argument
// types.
BlockArgument regionArg = entryBlock->getArgument(i);
- if (inlinedOperands[i]->getType() != regionArg->getType())
+ if (inlinedOperands[i].getType() != regionArg.getType())
return failure();
mapper.map(regionArg, inlinedOperands[i]);
}
@@ -302,7 +302,7 @@ LogicalResult mlir::inlineCall(InlinerInterface &interface,
// Functor used to cleanup generated state on failure.
auto cleanupState = [&] {
for (auto *op : castOps) {
- op->getResult(0)->replaceAllUsesWith(op->getOperand(0));
+ op->getResult(0).replaceAllUsesWith(op->getOperand(0));
op->erase();
}
return failure();
@@ -321,8 +321,8 @@ LogicalResult mlir::inlineCall(InlinerInterface &interface,
// If the call operand doesn't match the expected region argument, try to
// generate a cast.
- Type regionArgType = regionArg->getType();
- if (operand->getType() != regionArgType) {
+ Type regionArgType = regionArg.getType();
+ if (operand.getType() != regionArgType) {
if (!(operand = materializeConversion(callInterface, castOps, castBuilder,
operand, regionArgType, castLoc)))
return cleanupState();
@@ -334,18 +334,18 @@ LogicalResult mlir::inlineCall(InlinerInterface &interface,
castBuilder.setInsertionPointAfter(call);
for (unsigned i = 0, e = callResults.size(); i != e; ++i) {
Value callResult = callResults[i];
- if (callResult->getType() == callableResultTypes[i])
+ if (callResult.getType() == callableResultTypes[i])
continue;
// Generate a conversion that will produce the original type, so that the IR
// is still valid after the original call gets replaced.
Value castResult =
materializeConversion(callInterface, castOps, castBuilder, callResult,
- callResult->getType(), castLoc);
+ callResult.getType(), castLoc);
if (!castResult)
return cleanupState();
- callResult->replaceAllUsesWith(castResult);
- castResult->getDefiningOp()->replaceUsesOfWith(castResult, callResult);
+ callResult.replaceAllUsesWith(castResult);
+ castResult.getDefiningOp()->replaceUsesOfWith(castResult, callResult);
}
// Attempt to inline the call.
OpenPOWER on IntegriCloud