Skip to content

Commit 18639e0

Browse files
committed
Further changes per review comments
1 parent 482831d commit 18639e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ void IntegerRangeAnalysis::visitNonControlFlowArguments(
180180
return;
181181
}
182182

183-
/// Given a lower bound, upper bound, or step from aLoopLikeInterface return
183+
/// Given a lower bound, upper bound, or step from a LoopLikeInterface return
184184
/// the lower/upper bound for that result if possible.
185-
auto getLoopBoundFromFold = [&](std::optional<OpFoldResult> loopBound,
186-
Type boundType, Block *block, bool getUpper) {
185+
auto getLoopBoundFromFold = [&](OpFoldResult loopBound, Type boundType,
186+
Block *block, bool getUpper) {
187187
unsigned int width = ConstantIntRanges::getStorageBitwidth(boundType);
188-
if (auto attr = dyn_cast<Attribute>(*loopBound)) {
189-
if (auto bound = dyn_cast_or_null<IntegerAttr>(attr))
188+
if (auto attr = dyn_cast<Attribute>(loopBound)) {
189+
if (auto bound = dyn_cast<IntegerAttr>(attr))
190190
return bound.getValue();
191-
} else if (auto value = llvm::dyn_cast_if_present<Value>(*loopBound)) {
191+
} else if (auto value = llvm::dyn_cast<Value>(loopBound)) {
192192
const IntegerValueRangeLattice *lattice =
193193
getLatticeElementFor(getProgramPointBefore(block), value);
194194
if (lattice != nullptr && !lattice->getValue().isUninitialized())

0 commit comments

Comments
 (0)