[Mlir-commits] [mlir] [MLIR] NFC. Improve API signature + clang-tidy warning in IntegerRelation (PR #128993)
Uday Bondhugula
llvmlistbot at llvm.org
Fri Feb 28 13:51:26 PST 2025
================
@@ -1088,10 +1084,10 @@ unsigned IntegerRelation::gaussianEliminateVars(unsigned posStart,
unsigned pivotCol = 0;
for (pivotCol = posStart; pivotCol < posLimit; ++pivotCol) {
// Find a row which has a non-zero coefficient in column 'j'.
- unsigned pivotRow;
- if (!findConstraintWithNonZeroAt(pivotCol, /*isEq=*/true, &pivotRow)) {
+ std::optional<unsigned> pivotRow;
+ if (!(pivotRow = findConstraintWithNonZeroAt(pivotCol, /*isEq=*/true))) {
// No pivot row in equalities with non-zero at 'pivotCol'.
- if (!findConstraintWithNonZeroAt(pivotCol, /*isEq=*/false, &pivotRow)) {
+ if (!(pivotRow = findConstraintWithNonZeroAt(pivotCol, /*isEq=*/false))) {
----------------
bondhugula wrote:
Sure, done.
https://github.com/llvm/llvm-project/pull/128993
More information about the Mlir-commits
mailing list