[llvm] r275322 - [LAA] Don't hold on to AliasAnalysis in the analysis result
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 14:39:09 PDT 2016
Author: anemet
Date: Wed Jul 13 16:39:09 2016
New Revision: 275322
URL: http://llvm.org/viewvc/llvm-project?rev=275322&view=rev
Log:
[LAA] Don't hold on to AliasAnalysis in the analysis result
Modified:
llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
Modified: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=275322&r1=275321&r2=275322&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h Wed Jul 13 16:39:09 2016
@@ -522,9 +522,9 @@ public:
LoopAccessInfo(LoopAccessInfo &&LAI)
: PSE(std::move(LAI.PSE)), PtrRtChecking(std::move(LAI.PtrRtChecking)),
DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), DL(LAI.DL),
- TLI(LAI.TLI), AA(LAI.AA), DT(LAI.DT), LI(LAI.LI),
- NumLoads(LAI.NumLoads), NumStores(LAI.NumStores),
- MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem),
+ TLI(LAI.TLI), DT(LAI.DT), LI(LAI.LI), NumLoads(LAI.NumLoads),
+ NumStores(LAI.NumStores), MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes),
+ CanVecMem(LAI.CanVecMem),
StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress),
Report(std::move(LAI.Report)),
SymbolicStrides(std::move(LAI.SymbolicStrides)),
@@ -539,7 +539,6 @@ public:
TheLoop = LAI.TheLoop;
DL = LAI.DL;
TLI = LAI.TLI;
- AA = LAI.AA;
DT = LAI.DT;
LI = LAI.LI;
NumLoads = LAI.NumLoads;
@@ -638,7 +637,7 @@ public:
private:
/// \brief Analyze the loop.
- void analyzeLoop();
+ void analyzeLoop(AliasAnalysis *AA);
/// \brief Check if the structure of the loop allows it to be analyzed by this
/// pass.
@@ -665,7 +664,6 @@ private:
Loop *TheLoop;
const DataLayout *DL;
const TargetLibraryInfo *TLI;
- AliasAnalysis *AA;
DominatorTree *DT;
LoopInfo *LI;
Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=275322&r1=275321&r2=275322&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Wed Jul 13 16:39:09 2016
@@ -1505,7 +1505,7 @@ bool LoopAccessInfo::canAnalyzeLoop() {
return true;
}
-void LoopAccessInfo::analyzeLoop() {
+void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA) {
typedef SmallPtrSet<Value*, 16> ValueSet;
// Holds the Load and Store instructions.
@@ -1921,11 +1921,11 @@ LoopAccessInfo::LoopAccessInfo(Loop *L,
: PSE(llvm::make_unique<PredicatedScalarEvolution>(*SE, *L)),
PtrRtChecking(llvm::make_unique<RuntimePointerChecking>(SE)),
DepChecker(llvm::make_unique<MemoryDepChecker>(*PSE, L)), TheLoop(L),
- DL(&DL), TLI(TLI), AA(AA), DT(DT), LI(LI), NumLoads(0), NumStores(0),
+ DL(&DL), TLI(TLI), DT(DT), LI(LI), NumLoads(0), NumStores(0),
MaxSafeDepDistBytes(-1), CanVecMem(false),
StoreToLoopInvariantAddress(false) {
if (canAnalyzeLoop())
- analyzeLoop();
+ analyzeLoop(AA);
}
void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {
More information about the llvm-commits
mailing list