[all-commits] [llvm/llvm-project] 1dbcaf: [LAA] Check if dependencies access loop-varying un...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Nov 15 13:59:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1dbcaf277714331bfc60dc6ead31b0e3a300de24
https://github.com/llvm/llvm-project/commit/1dbcaf277714331bfc60dc6ead31b0e3a300de24
Author: Florian Hahn <flo at fhahn.com>
Date: 2023-11-15 (Wed, 15 Nov 2023)
Changed paths:
M llvm/include/llvm/Analysis/LoopAccessAnalysis.h
M llvm/lib/Analysis/LoopAccessAnalysis.cpp
M llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
M llvm/test/Analysis/LoopAccessAnalysis/loops-with-indirect-reads-and-writes.ll
Log Message:
-----------
[LAA] Check if dependencies access loop-varying underlying objects.
This patch adds a new dependence kind UnsafeIndirect, for cases where at
least one of the memory access instructions may access a loop varying object,
e.g. the address of underlying object is loaded inside the loop, like A[B[i]].
We cannot determine direction or distance in those cases, and also are unable
to generate any runtime checks.
This fixes a miscompile, if we attempt to generate runtime checks for
unknown dependencies.
Note that in most cases we do not attempt to generate runtime checks for
unknown dependences, except if FoundNonConstantDistanceDependence is
true.
Fixes https://github.com/llvm/llvm-project/issues/69744.
More information about the All-commits
mailing list