diff options
author | Ryotaro Kasuga <kasuga.ryotaro@fujitsu.com> | 2025-07-25 22:37:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-25 22:37:20 +0900 |
commit | b75530ff034a131da8ca1f05a00f3655c13839ff (patch) | |
tree | b15689949ce37549684bcc38a3f96a6ed3c4fda3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 81bbe98abf4b23d2e568d7e643a9b25738dd8819 (diff) | |
download | llvm-b75530ff034a131da8ca1f05a00f3655c13839ff.zip llvm-b75530ff034a131da8ca1f05a00f3655c13839ff.tar.gz llvm-b75530ff034a131da8ca1f05a00f3655c13839ff.tar.bz2 |
[LoopInterchange] Consider forward/backward dependency in vectorize heuristic (#133672)
The vectorization heuristic of LoopInterchange attempts to move a
vectorizable loop to the innermost position. Before this patch, a loop
was deemed vectorizable if there are no loop-carried dependencies
induced by the loop.
This patch extends the vectorization heuristic by introducing the
concept of forward and backward dependencies, inspired by
LoopAccessAnalysis. Specifically, an additional element is appended to
each direction vector to indicate whether it represents a forward
dependency (`<`) or not (`*`). Among these, only the forward
dependencies (i.e., those whose last element is `<`) affect the
vectorization heuristic. Accordingly, the check is conservative, and
dependencies are considered forward only when this can be proven.
Currently, we only support perfectly nested loops whose body consists of
a single basic block. For other cases, dependencies are pessimistically
treated as non-forward.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions