diff options
author | Ryotaro Kasuga <kasuga.ryotaro@fujitsu.com> | 2025-10-21 18:11:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-21 09:11:09 +0000 |
commit | ab789beffdf68c65722203250d3094c15466459f (patch) | |
tree | 70aa1c516d7bc1f71281a1e534cb187c4d127c0b /lldb/packages/Python/lldbsuite/test | |
parent | 00092f9bdd1d5037a5f4c8f3059e31e32aee6e8d (diff) | |
download | llvm-ab789beffdf68c65722203250d3094c15466459f.zip llvm-ab789beffdf68c65722203250d3094c15466459f.tar.gz llvm-ab789beffdf68c65722203250d3094c15466459f.tar.bz2 |
[DA] Add initial support for monotonicity check (#162280)
The dependence testing functions in DA assume that the analyzed AddRec
does not wrap over the entire iteration space. For AddRecs that may
wrap, DA should conservatively return unknown dependence. However, no
validation is currently performed to ensure that this condition holds,
which can lead to incorrect results in some cases.
This patch introduces the notion of *monotonicity* and a validation
logic to check whether a SCEV is monotonic. The monotonicity check
classifies the SCEV into one of the following categories:
- Unknown: Nothing is known about the monotonicity of the SCEV.
- Invariant: The SCEV is loop-invariant.
- MultivariateSignedMonotonic: The SCEV doesn't wrap in a signed sense
for any iteration of the loops in the loop nest.
The current validation logic basically searches an affine AddRec
recursively and checks whether the `nsw` flag is present. Notably, it is
still unclear whether we should also have a category for unsigned
monotonicity.
The monotonicity check is still under development and disabled by
default for now. Since such a check is necessary to make DA sound, it
should be enabled by default once the functionality is sufficient.
Split off from #154527.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions