@@ -216,9 +216,8 @@ void mlir::affine::getTripCountMapAndOperands(
216
216
217
217
// / Take the min if all trip counts are constant.
218
218
static std::optional<uint64_t >
219
- getConstantTripCountFromAffineMap (AffineMap map,
220
- SmallVectorImpl<Value> &operands,
221
- presburger::BoundType type) {
219
+ getKnownTripCountBound (AffineMap map, SmallVectorImpl<Value> &operands,
220
+ presburger::BoundType type) {
222
221
std::optional<uint64_t > tripCount;
223
222
for (auto resultExpr : map.getResults ()) {
224
223
AffineMap subMap =
@@ -260,8 +259,7 @@ std::optional<uint64_t> mlir::affine::getConstantTripCount(AffineForOp forOp) {
260
259
261
260
if (!map)
262
261
return std::nullopt;
263
- return getConstantTripCountFromAffineMap (map, operands,
264
- presburger::BoundType::LB);
262
+ return getKnownTripCountBound (map, operands, presburger::BoundType::LB);
265
263
}
266
264
267
265
// / Returns the maximum trip count when the operand of forOp has a range. If the
@@ -275,8 +273,7 @@ mlir::affine::getUpperBoundOnTripCount(AffineForOp forOp) {
275
273
276
274
if (!map)
277
275
return std::nullopt;
278
- return getConstantTripCountFromAffineMap (map, operands,
279
- presburger::BoundType::UB);
276
+ return getKnownTripCountBound (map, operands, presburger::BoundType::UB);
280
277
}
281
278
282
279
// / Returns the greatest known integral divisor of the trip count. Affine
0 commit comments