Skip to content

Commit 12e7e88

Browse files
[mlir][Interfaces][NFC] ValueBoundsConstraintSet: Delete dead code
There is an assertion that the stop condition is not satisfied for the the starting point at the beginning of `computeBound`. Therefore, that case does not have to be handled later on in that function.
1 parent 13c9d7f commit 12e7e88

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

mlir/lib/Interfaces/ValueBoundsOpInterface.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,6 @@ LogicalResult ValueBoundsConstraintSet::computeBound(
321321
Builder b(value.getContext());
322322
mapOperands.clear();
323323

324-
if (stopCondition(value, dim)) {
325-
// Special case: If the stop condition is satisfied for the input
326-
// value/dimension, directly return it.
327-
mapOperands.push_back(std::make_pair(value, dim));
328-
AffineExpr bound = b.getAffineDimExpr(0);
329-
if (type == BoundType::UB)
330-
bound = bound + ubAdjustment;
331-
resultMap = AffineMap::get(/*dimCount=*/1, /*symbolCount=*/0,
332-
b.getAffineDimExpr(0));
333-
return success();
334-
}
335-
336324
// Process the backward slice of `value` (i.e., reverse use-def chain) until
337325
// `stopCondition` is met.
338326
ValueDim valueDim = std::make_pair(value, dim.value_or(kIndexValue));

0 commit comments

Comments
 (0)