[Mlir-commits] [mlir] [mlir][affine] Update getSliceBounds to allow multi-result upper bound maps (PR #219369)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Aug 27 23:17:05 PDT 2026


================
@@ -158,10 +158,15 @@ class FlatLinearConstraints : public presburger::IntegerPolyhedron {
   ///
   /// By default the returned lower bounds are closed and upper bounds are open.
   /// If `closedUb` is true, the upper bound is closed.
+  ///
+  /// An upper bound built from more than one inequality is the min of them.
+  /// Only a caller that can consume such a bound should ask for it, via
+  /// `allowMultiResultUb`; the rest are given the constant upper bound
+  /// instead, which is weaker but always a single result.
   void getSliceBounds(unsigned offset, unsigned num, MLIRContext *context,
                       SmallVectorImpl<AffineMap> *lbMaps,
-                      SmallVectorImpl<AffineMap> *ubMaps,
-                      bool closedUB = false);
+                      SmallVectorImpl<AffineMap> *ubMaps, bool closedUB = false,
+                      bool allowMultiResultUb = false);
----------------
lipracer wrote:

Nit: `allowMultiResultUb` → `allowMultiResultUB`, for consistency with `closedUB`.

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


More information about the Mlir-commits mailing list