[Mlir-commits] [mlir] [mlir] [presburger] Add IntegerRelation::rangeProduct (PR #148092)

Arjun P llvmlistbot at llvm.org
Wed Jul 16 07:08:55 PDT 2025


================
@@ -2488,28 +2488,31 @@ IntegerRelation IntegerRelation::rangeProduct(const IntegerRelation &rel) {
   assert(getNumDomainVars() == rel.getNumDomainVars() &&
          "Range product is only defined for relations with equal domains");
 
-  // explicit copy of the context relation
+  // explicit copy of `this`
   IntegerRelation result = *this;
-  unsigned srcOffset = getVarKindOffset(VarKind::Range);
-  unsigned newNumRangeVars = rel.getNumRangeVars();
+  unsigned relRangeVarStart = rel.getVarKindOffset(VarKind::Range);
----------------
Superty wrote:

I don't think this should make a difference from what you used before, because getVarKinfOffset(VarKind::Range) returns getNumDomainVars(), which is supposed to be equal for both. calling it on this might be slightly cleaner, though it's not a big deal. I'm more concerned that you seem to indicate that changing this changed the behaviour somehow, can you explain that further?

https://github.com/llvm/llvm-project/pull/148092


More information about the Mlir-commits mailing list