Skip to content

Commit f295789

Browse files
committed
Consistent naming/order
1 parent 179b27b commit f295789

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

mlir/include/mlir/IR/AffineExprVisitor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,15 +418,15 @@ class SimpleAffineExprFlattener
418418
AffineExpr localExpr);
419419

420420
private:
421-
/// Adds `expr`, which may be mod, ceildiv, floordiv or mod expression
421+
/// Adds `localExpr`, which may be mod, ceildiv, floordiv or mod expression
422422
/// representing the affine expression corresponding to the quantifier
423-
/// introduced as the local variable corresponding to `expr`. If the
423+
/// introduced as the local variable corresponding to `localExpr`. If the
424424
/// quantifier is already present, we put the coefficient in the proper index
425425
/// of `result`, otherwise we add a new local variable and put the coefficient
426426
/// there.
427-
LogicalResult addLocalVariableSemiAffine(AffineExpr expr,
428-
ArrayRef<int64_t> lhs,
427+
LogicalResult addLocalVariableSemiAffine(ArrayRef<int64_t> lhs,
429428
ArrayRef<int64_t> rhs,
429+
AffineExpr localExpr,
430430
SmallVectorImpl<int64_t> &result,
431431
unsigned long resultSize);
432432

mlir/lib/IR/AffineExpr.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ LogicalResult SimpleAffineExprFlattener::visitMulExpr(AffineBinaryOpExpr expr) {
12481248
localExprs, context);
12491249
AffineExpr b = getAffineExprFromFlatForm(rhs, numDims, numSymbols,
12501250
localExprs, context);
1251-
return addLocalVariableSemiAffine(a * b, mulLhs, rhs, lhs, lhs.size());
1251+
return addLocalVariableSemiAffine(mulLhs, rhs, a * b, lhs, lhs.size());
12521252
}
12531253

12541254
// Get the RHS constant.
@@ -1301,7 +1301,7 @@ LogicalResult SimpleAffineExprFlattener::visitModExpr(AffineBinaryOpExpr expr) {
13011301
AffineExpr divisorExpr = getAffineExprFromFlatForm(rhs, numDims, numSymbols,
13021302
localExprs, context);
13031303
AffineExpr modExpr = dividendExpr % divisorExpr;
1304-
return addLocalVariableSemiAffine(modExpr, modLhs, rhs, lhs, lhs.size());
1304+
return addLocalVariableSemiAffine(modLhs, rhs, modExpr, lhs, lhs.size());
13051305
}
13061306

13071307
int64_t rhsConst = rhs[getConstantIndex()];
@@ -1386,13 +1386,13 @@ SimpleAffineExprFlattener::visitConstantExpr(AffineConstantExpr expr) {
13861386
}
13871387

13881388
LogicalResult SimpleAffineExprFlattener::addLocalVariableSemiAffine(
1389-
AffineExpr expr, ArrayRef<int64_t> lhs, ArrayRef<int64_t> rhs,
1389+
ArrayRef<int64_t> lhs, ArrayRef<int64_t> rhs, AffineExpr localExpr,
13901390
SmallVectorImpl<int64_t> &result, unsigned long resultSize) {
13911391
assert(result.size() == resultSize &&
13921392
"`result` vector passed is not of correct size");
13931393
int loc;
1394-
if ((loc = findLocalId(expr)) == -1) {
1395-
if (failed(addLocalIdSemiAffine(lhs, rhs, expr)))
1394+
if ((loc = findLocalId(localExpr)) == -1) {
1395+
if (failed(addLocalIdSemiAffine(lhs, rhs, localExpr)))
13961396
return failure();
13971397
}
13981398
std::fill(result.begin(), result.end(), 0);
@@ -1435,7 +1435,7 @@ LogicalResult SimpleAffineExprFlattener::visitDivExpr(AffineBinaryOpExpr expr,
14351435
AffineExpr b = getAffineExprFromFlatForm(rhs, numDims, numSymbols,
14361436
localExprs, context);
14371437
AffineExpr divExpr = isCeil ? a.ceilDiv(b) : a.floorDiv(b);
1438-
return addLocalVariableSemiAffine(divExpr, divLhs, rhs, lhs, lhs.size());
1438+
return addLocalVariableSemiAffine(divLhs, rhs, divExpr, lhs, lhs.size());
14391439
}
14401440

14411441
// This is a pure affine expr; the RHS is a positive constant.

0 commit comments

Comments
 (0)