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/AffineStructures.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/AffineStructures.cpp')
-rw-r--r-- | mlir/lib/Analysis/AffineStructures.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp index 78a869884ee..b5e314047b0 100644 --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -585,7 +585,7 @@ static void mergeAndAlignIds(unsigned offset, FlatAffineConstraints *A, unsigned d = offset; for (auto aDimValue : aDimValues) { unsigned loc; - if (B->findId(*aDimValue, &loc)) { + if (B->findId(aDimValue, &loc)) { assert(loc >= offset && "A's dim appears in B's aligned range"); assert(loc < B->getNumDimIds() && "A's dim appears in B's non-dim position"); @@ -608,7 +608,7 @@ static void mergeAndAlignIds(unsigned offset, FlatAffineConstraints *A, unsigned s = B->getNumDimIds(); for (auto aSymValue : aSymValues) { unsigned loc; - if (B->findId(*aSymValue, &loc)) { + if (B->findId(aSymValue, &loc)) { assert(loc >= B->getNumDimIds() && loc < B->getNumDimAndSymbolIds() && "A's symbol appears in B's non-symbol position"); swapId(B, s, loc); @@ -683,7 +683,7 @@ LogicalResult FlatAffineConstraints::composeMap(const AffineValueMap *vMap) { // Dims and symbols. for (unsigned i = 0, e = vMap->getNumOperands(); i < e; i++) { unsigned loc; - bool ret = findId(*vMap->getOperand(i), &loc); + bool ret = findId(vMap->getOperand(i), &loc); assert(ret && "value map's id can't be found"); (void)ret; // Negate 'eq[r]' since the newly added dimension will be set to this one. @@ -804,12 +804,12 @@ void FlatAffineConstraints::convertLoopIVSymbolsToDims() { } // Turn each symbol in 'loopIVs' into a dim identifier. for (auto iv : loopIVs) { - turnSymbolIntoDim(this, *iv); + turnSymbolIntoDim(this, iv); } } void FlatAffineConstraints::addInductionVarOrTerminalSymbol(Value id) { - if (containsId(*id)) + if (containsId(id)) return; // Caller is expected to fully compose map/operands if necessary. @@ -826,14 +826,14 @@ void FlatAffineConstraints::addInductionVarOrTerminalSymbol(Value id) { // Add top level symbol. addSymbolId(getNumSymbolIds(), id); // Check if the symbol is a constant. - if (auto constOp = dyn_cast_or_null<ConstantIndexOp>(id->getDefiningOp())) - setIdToConstant(*id, constOp.getValue()); + if (auto constOp = dyn_cast_or_null<ConstantIndexOp>(id.getDefiningOp())) + setIdToConstant(id, constOp.getValue()); } LogicalResult FlatAffineConstraints::addAffineForOpDomain(AffineForOp forOp) { unsigned pos; // Pre-condition for this method. - if (!findId(*forOp.getInductionVar(), &pos)) { + if (!findId(forOp.getInductionVar(), &pos)) { assert(false && "Value not found"); return failure(); } @@ -1780,13 +1780,13 @@ FlatAffineConstraints::addLowerOrUpperBound(unsigned pos, AffineMap boundMap, localVarCst.setIdValues(0, localVarCst.getNumDimAndSymbolIds(), operands); for (auto operand : operands) { unsigned pos; - if (findId(*operand, &pos)) { + if (findId(operand, &pos)) { if (pos >= getNumDimIds() && pos < getNumDimAndSymbolIds()) { // If the local var cst has this as a dim, turn it into its symbol. - turnDimIntoSymbol(&localVarCst, *operand); + turnDimIntoSymbol(&localVarCst, operand); } else if (pos < getNumDimIds()) { // Or vice versa. - turnSymbolIntoDim(&localVarCst, *operand); + turnSymbolIntoDim(&localVarCst, operand); } } } @@ -1800,7 +1800,7 @@ FlatAffineConstraints::addLowerOrUpperBound(unsigned pos, AffineMap boundMap, unsigned numOperands = operands.size(); for (auto operand : operands) { unsigned pos; - if (!findId(*operand, &pos)) + if (!findId(operand, &pos)) assert(0 && "expected to be found"); positions.push_back(pos); } @@ -1847,7 +1847,7 @@ LogicalResult FlatAffineConstraints::addSliceBounds(ArrayRef<Value> values, for (unsigned i = 0, e = lbMaps.size(); i < e; ++i) { unsigned pos; - if (!findId(*values[i], &pos)) + if (!findId(values[i], &pos)) continue; AffineMap lbMap = lbMaps[i]; @@ -2703,7 +2703,7 @@ void FlatAffineConstraints::projectOut(unsigned pos, unsigned num) { void FlatAffineConstraints::projectOut(Value id) { unsigned pos; - bool ret = findId(*id, &pos); + bool ret = findId(id, &pos); assert(ret); (void)ret; FourierMotzkinEliminate(pos); |