[Mlir-commits] [mlir] [mlir][ValueBounds] Decouple merge collection and solving (PR #226944)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Sep 28 03:16:49 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-linalg
Author: donald chen (cxy-1993)
<details>
<summary>Changes</summary>
Implement phase 1 of the ValueBounds constraint collection and solving RFC:
https://discourse.llvm.org/t/rfc-decoupling-constraint-collection-and-solving-in-mlir-valuebounds/91884
Introduce an atomic addMerge API that records the complete set of possible origins for a target. A target may register exactly one merge relationship. This prevents nested temporary queries from observing a partially collected relationship and moves conservative envelope computation out of individual op interfaces.
Expose ValueDim alongside the existing ValueDimList and migrate ValueBounds APIs to use it. A ValueDim is the graph-node identity used by ValueBounds, and representing both the target and every candidate this way allows each merge edge to select its own shaped dimension without positional Value/dimension argument pairs.
After processing the constraint worklist, solve collected merges to a fixed point. Single-candidate merges become equalities; multi-candidate merges derive independently provable lower and upper envelopes. Migrate arith.select and scf.if to relationship collection and add coverage for temporary evaluation, nested merges, single and multiple candidates, and differing candidate dimensions.
---
Full diff: https://github.com/llvm/llvm-project/pull/226944.diff
22 Files Affected:
- (modified) mlir/include/mlir/Dialect/Affine/Transforms/Transforms.h (+3-3)
- (modified) mlir/include/mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h (+3-4)
- (modified) mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h (+79-28)
- (modified) mlir/lib/Dialect/Affine/Transforms/ReifyValueBounds.cpp (+7-7)
- (modified) mlir/lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp (+10-42)
- (modified) mlir/lib/Dialect/Arith/Transforms/ReifyValueBounds.cpp (+4-4)
- (modified) mlir/lib/Dialect/Bufferization/IR/ValueBoundsOpInterfaceImpl.cpp (+1-1)
- (modified) mlir/lib/Dialect/GPU/IR/ValueBoundsOpInterfaceImpl.cpp (+1-1)
- (modified) mlir/lib/Dialect/Linalg/IR/ValueBoundsOpInterfaceImpl.cpp (+1-1)
- (modified) mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp (+2-1)
- (modified) mlir/lib/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.cpp (+6-6)
- (modified) mlir/lib/Dialect/SCF/IR/ValueBoundsOpInterfaceImpl.cpp (+7-37)
- (modified) mlir/lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp (+8-8)
- (modified) mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp (+11-12)
- (modified) mlir/lib/Dialect/Vector/IR/VectorOps.cpp (+2-1)
- (modified) mlir/lib/Dialect/Vector/Transforms/VectorMaskElimination.cpp (+2-2)
- (modified) mlir/lib/Interfaces/ValueBoundsOpInterface.cpp (+207-85)
- (modified) mlir/test/Dialect/Arith/value-bounds-op-interface-impl.mlir (+75)
- (modified) mlir/test/Dialect/SCF/value-bounds-op-interface-impl.mlir (+34)
- (modified) mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp (+7-10)
- (modified) mlir/test/lib/Dialect/Test/TestOpDefs.cpp (+31)
- (modified) mlir/test/lib/Dialect/Test/TestOps.td (+26)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/226944
More information about the Mlir-commits
mailing list