[Mlir-commits] [mlir] [mlir][ValueBounds] Skip analysis for identical slice components (PR #226894)
Matthias Springer
llvmlistbot at llvm.org
Mon Sep 28 17:14:47 PDT 2026
================
@@ -955,6 +955,10 @@ FailureOr<bool> ValueBoundsConstraintSet::areEquivalentSlices(
// "failure".
for (auto [offset1, offset2] :
llvm::zip_equal(slice1.getMixedOffsets(), slice2.getMixedOffsets())) {
+ // Avoid constructing a constraint set for values/attributes that are
+ // already known to be identical.
+ if (offset1 == offset2)
----------------
matthias-springer wrote:
Can you move this fast path to `ValueBoundsConstraintSet::areEqual`? Then it will also apply in other cases.
https://github.com/llvm/llvm-project/pull/226894
More information about the Mlir-commits
mailing list