diff options
author | Florian Hahn <flo@fhahn.com> | 2024-07-26 13:10:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 13:10:16 +0100 |
commit | 844c188c7988f33e392cde06574d95dab3d0d60a (patch) | |
tree | 0bb0eb0797f0cec72d944f74cf182fcddf3d6dab /clang/lib/Basic/LangOptions.cpp | |
parent | 67ad23fe17a516b4b66d8137f77ab0ba3b6fc95b (diff) | |
download | llvm-844c188c7988f33e392cde06574d95dab3d0d60a.zip llvm-844c188c7988f33e392cde06574d95dab3d0d60a.tar.gz llvm-844c188c7988f33e392cde06574d95dab3d0d60a.tar.bz2 |
[LAA] Refine stride checks for SCEVs during dependence analysis. (#99577)
Update getDependenceDistanceStrideAndSize to reason about different
combinations of strides directly and explicitly.
Update getPtrStride to return 0 for invariant pointers.
Then proceed by checking the strides.
If either source or sink are not strided by a constant (i.e. not a
non-wrapping AddRec) or invariant, the accesses may overlap
with earlier or later iterations and we cannot generate runtime
checks to disambiguate them.
Otherwise they are either loop invariant or strided. In that case, we
can generate a runtime check to disambiguate them.
If both are strided by constants, we proceed as previously.
This is an alternative to
https://github.com/llvm/llvm-project/pull/99239 and also replaces
additional checks if the underlying object is loop-invariant.
Fixes https://github.com/llvm/llvm-project/issues/87189.
PR: https://github.com/llvm/llvm-project/pull/99577
Diffstat (limited to 'clang/lib/Basic/LangOptions.cpp')
0 files changed, 0 insertions, 0 deletions