[Mlir-commits] [mlir] [mlir][Interfaces][NFC] `ValueBoundsConstraintSet`: Add columns for constant values/dims (PR #86097)

Matthias Springer llvmlistbot at llvm.org
Mon Mar 25 02:22:34 PDT 2024


================
@@ -107,25 +107,57 @@ AffineExpr ValueBoundsConstraintSet::getExpr(Value value,
   assertValidValueDim(value, dim);
 #endif // NDEBUG
 
+  // Helper function that returns an affine expression that represents column
+  // `pos` in the constraint set.
+  auto getPosExpr = [&](int64_t pos) {
+    assert(pos >= 0 && pos < cstr.getNumDimAndSymbolVars() &&
+           "invalid position");
+    return pos < cstr.getNumDimVars()
----------------
matthias-springer wrote:

I have a WIP change that turns this into a member function (so that it can be called from various places). Can also be done now, I moved it into this PR.


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


More information about the Mlir-commits mailing list