aboutsummaryrefslogtreecommitdiff
path: root/llvm/include
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2022-08-26 20:39:52 +0100
committerTobias Hieta <tobias@hieta.se>2022-08-30 08:08:28 +0200
commit9070c258c143d6666274da3c70971bd266cabb82 (patch)
tree2ca85ce4248146cbb45ffa3777fb29874fcb55b7 /llvm/include
parent3367244b7e9ba261cb52aad5d1bd5ffa389f9498 (diff)
downloadllvm-9070c258c143d6666274da3c70971bd266cabb82.zip
llvm-9070c258c143d6666274da3c70971bd266cabb82.tar.gz
llvm-9070c258c143d6666274da3c70971bd266cabb82.tar.bz2
[LAA] Require AddRecs to be in the innermost loop for diff-checks.
The simpler diff-checks require pointers with add-recs from the same innermost loop, but this property wasn't check completely. Add the missing check to ensure both addrecs are in the innermost loop. Fixes #57315. (cherry picked from commit 9405af1c850139f6ddd6d35ff395756fe2aef31f)
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/LoopAccessAnalysis.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
index 8f71ce9..af8e8d2 100644
--- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -253,6 +253,8 @@ public:
return {};
}
+ const Loop *getInnermostLoop() const { return InnermostLoop; }
+
private:
/// A wrapper around ScalarEvolution, used to add runtime SCEV checks, and
/// applies dynamic knowledge to simplify SCEV expressions and convert them