[llvm-branch-commits] [mlir] [mlir][Interfaces][NFC] `ValueBoundsConstraintSet`: Pass stop condition in the constructor (PR #86099)

Benjamin Maxwell via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 21 09:39:17 PDT 2024


================
@@ -316,6 +317,9 @@ class ValueBoundsConstraintSet {
 
   /// Builder for constructing affine expressions.
   Builder builder;
+
+  /// The current stop condition function.
+  StopConditionFn stopCondition = nullptr;
----------------
MacDue wrote:

Just wondering if this should be a `std::function` instead? `function_ref` begin non-owning could lead to some surprises. E.g. by doing `ValueBoundsConstraintSet cstr(..., /*stopCondition=*/[&]{ ... })`.

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


More information about the llvm-branch-commits mailing list