[all-commits] [llvm/llvm-project] 297eca: [mlir][Interfaces] `ValueBoundsOpInterface`: Add A...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Wed Apr 10 23:24:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 297eca981ea1133388c82ddbfaf9d86391abac65
https://github.com/llvm/llvm-project/commit/297eca981ea1133388c82ddbfaf9d86391abac65
Author: Matthias Springer <me at m-sp.org>
Date: 2024-04-11 (Thu, 11 Apr 2024)
Changed paths:
M mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
M mlir/lib/Dialect/SCF/IR/ValueBoundsOpInterfaceImpl.cpp
M mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
M mlir/test/Dialect/Affine/value-bounds-op-interface-impl.mlir
M mlir/test/Dialect/SCF/value-bounds-op-interface-impl.mlir
M mlir/test/Dialect/Tensor/value-bounds-op-interface-impl.mlir
M mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp
Log Message:
-----------
[mlir][Interfaces] `ValueBoundsOpInterface`: Add API to compare values (#86915)
This commit adds a new public API to `ValueBoundsOpInterface` to compare
values/dims. Supported comparison operators are: LT, LE, EQ, GE, GT.
The new `ValueBoundsOpInterface::compare` API replaces and generalizes
`ValueBoundsOpInterface::areEqual`. Not only does it provide additional
comparison operators, it also works in cases where the difference
between the two values/dims is non-constant. The previous implementation
of `areEqual` used to compute a constant bound of `val1 - val2` (check
if it `== 0` or `!= 0`).
Note: This commit refactors, generalizes and adds a public API for
value/dim comparison. The comparison functionality itself was introduced
in #85895 and is already in use for analyzing `scf.if`.
In the long term, this improvement will allow for a more powerful
analysis of subset ops. A future commit will update
`areOverlappingSlices` to use the new comparison API.
(`areEquivalentSlices` is already using the new API.) This will improve
subset equivalence/disjointness checks with non-constant
offsets/sizes/strides.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list