File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
include/mlir/Analysis/DataFlow Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class Lattice : public AbstractSparseLattice {
8787 using AbstractSparseLattice::AbstractSparseLattice;
8888
8989 // / Return the value this lattice is located at.
90- Value getAnchor () const { return anchor. get <Value>(); }
90+ Value getAnchor () const { return cast <Value>(anchor ); }
9191
9292 // / Return the value held by this lattice. This requires that the value is
9393 // / initialized.
Original file line number Diff line number Diff line change @@ -103,9 +103,9 @@ LogicalResult SparseConstantPropagation::visitOperation(
103103 lattice->join (ConstantValue (attr, op->getDialect ())));
104104 } else {
105105 LLVM_DEBUG (llvm::dbgs ()
106- << " Folded to value: " << foldResult. get <Value>() << " \n " );
106+ << " Folded to value: " << cast <Value>(foldResult ) << " \n " );
107107 AbstractSparseForwardDataFlowAnalysis::join (
108- lattice, *getLatticeElement (foldResult. get <Value>()));
108+ lattice, *getLatticeElement (cast <Value>(foldResult )));
109109 }
110110 }
111111 return success ();
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ void IntegerValueRangeLattice::onUpdate(DataFlowSolver *solver) const {
4343 // If the integer range can be narrowed to a constant, update the constant
4444 // value of the SSA value.
4545 std::optional<APInt> constant = getValue ().getValue ().getConstantValue ();
46- auto value = anchor. get <Value>();
46+ auto value = cast <Value>(anchor );
4747 auto *cv = solver->getOrCreateState <Lattice<ConstantValue>>(value);
4848 if (!constant)
4949 return solver->propagateIfChanged (
@@ -155,9 +155,9 @@ void IntegerRangeAnalysis::visitNonControlFlowArguments(
155155 Type boundType, bool getUpper) {
156156 unsigned int width = ConstantIntRanges::getStorageBitwidth (boundType);
157157 if (loopBound.has_value ()) {
158- if (loopBound-> is <Attribute>()) {
158+ if (isa <Attribute>(*loopBound )) {
159159 if (auto bound =
160- dyn_cast_or_null<IntegerAttr>(loopBound-> get <Attribute>()))
160+ dyn_cast_or_null<IntegerAttr>(cast <Attribute>(*loopBound )))
161161 return bound.getValue ();
162162 } else if (auto value = llvm::dyn_cast_if_present<Value>(*loopBound)) {
163163 const IntegerValueRangeLattice *lattice =
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ void AbstractSparseLattice::onUpdate(DataFlowSolver *solver) const {
3434 AnalysisState::onUpdate (solver);
3535
3636 // Push all users of the value to the queue.
37- for (Operation *user : anchor. get <Value>().getUsers ())
37+ for (Operation *user : cast <Value>(anchor ).getUsers ())
3838 for (DataFlowAnalysis *analysis : useDefSubscribers)
3939 solver->enqueue ({solver->getProgramPointAfter (user), analysis});
4040}
You can’t perform that action at this time.
0 commit comments