[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
This commit is contained in:
River Riddle
2020-01-11 08:54:04 -08:00
parent 1d641daf26
commit 2bdf33cc4c
138 changed files with 957 additions and 1003 deletions

View File

@@ -66,7 +66,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
// Insert stats for each argument.
for (auto arg : func.getArguments()) {
if (!config.isHandledType(arg->getType()))
if (!config.isHandledType(arg.getType()))
continue;
OpBuilder b(func.getBody());
APFloat minValue(-1.0f);
@@ -75,7 +75,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
RankedTensorType::get({2}, b.getF32Type()), {minValue, maxValue});
auto statsOp = b.create<StatisticsOp>(func.getLoc(), arg, layerStats,
nullptr, nullptr);
arg->replaceAllUsesWith(statsOp);
arg.replaceAllUsesWith(statsOp);
// StatsOp contained a use to 'arg' so make sure to reset it after replacing
// all of the uses of 'arg'.
@@ -90,7 +90,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
assert(op->getNumResults() == 1);
auto originalResult = op->getResult(0);
if (!config.isHandledType(originalResult->getType()))
if (!config.isHandledType(originalResult.getType()))
return;
OpBuilder b(op->getBlock(), ++op->getIterator());
@@ -101,7 +101,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
RankedTensorType::get({2}, b.getF32Type()), {minValue, maxValue});
auto statsOp = b.create<StatisticsOp>(op->getLoc(), op->getResult(0),
layerStats, nullptr, nullptr);
originalResult->replaceAllUsesWith(statsOp);
originalResult.replaceAllUsesWith(statsOp);
// StatsOp contained a use to 'op' so make sure to reset it after replacing
// all of the uses of 'op'.