diff options
author | Nikita Popov <npopov@redhat.com> | 2022-11-14 15:08:44 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-12-05 08:12:26 +0100 |
commit | e95ca5bb05ec123af1949469767de30036a11ecb (patch) | |
tree | 41d47aa05b82b3a4e7a09d96512647b37923d35a /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 75801e3b45565d7d14ef6ead2132dc06fc009941 (diff) | |
download | llvm-e95ca5bb05ec123af1949469767de30036a11ecb.zip llvm-e95ca5bb05ec123af1949469767de30036a11ecb.tar.gz llvm-e95ca5bb05ec123af1949469767de30036a11ecb.tar.bz2 |
[AST] Make AliasSetTracker work on BatchAA
D138014 restricted AST to work on immutable IR. This means it is
also safe to use a single BatchAA instance for the entire AST
lifetime, instead of only batching parts of individual queries.
The primary motivation for this is not compile-time, but rather
having a central place to control cross-iteration AA, which will
be used by D137958.
Differential Revision: https://reviews.llvm.org/D137955
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 56175ea..1bc2f6b 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -622,7 +622,7 @@ public: AccessAnalysis(Loop *TheLoop, AAResults *AA, LoopInfo *LI, MemoryDepChecker::DepCandidates &DA, PredicatedScalarEvolution &PSE) - : TheLoop(TheLoop), AST(*AA), LI(LI), DepCands(DA), PSE(PSE) {} + : TheLoop(TheLoop), BAA(*AA), AST(BAA), LI(LI), DepCands(DA), PSE(PSE) {} /// Register a load and whether it is only read from. void addLoad(MemoryLocation &Loc, Type *AccessTy, bool IsReadOnly) { @@ -704,6 +704,9 @@ private: /// Set of pointers that are read only. SmallPtrSet<Value*, 16> ReadOnlyPtr; + /// Batched alias analysis results. + BatchAAResults BAA; + /// An alias set tracker to partition the access set by underlying object and //intrinsic property (such as TBAA metadata). AliasSetTracker AST; |