diff options
author | Adam Nemet <anemet@apple.com> | 2016-07-13 22:36:35 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-07-13 22:36:35 +0000 |
commit | 7da74abf3d48e1989cf39a9a004a54b6efa0adaa (patch) | |
tree | 2936f54c45b30dc476b011fd69ba091dbd9db2cd | |
parent | b49d9a56eb7dafd3f6b2d9db307ee794c7c6092a (diff) | |
download | bcm5719-llvm-7da74abf3d48e1989cf39a9a004a54b6efa0adaa.tar.gz bcm5719-llvm-7da74abf3d48e1989cf39a9a004a54b6efa0adaa.zip |
[LAA] Don't hold on to DominatorTree in the analysis result
llvm-svn: 275335
-rw-r--r-- | llvm/include/llvm/Analysis/LoopAccessAnalysis.h | 6 | ||||
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h index a376feb7c4e..ceee1be5e1e 100644 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h @@ -520,7 +520,7 @@ public: // LoopAccessInfo(LoopAccessInfo &&LAI) = default; LoopAccessInfo(LoopAccessInfo &&LAI) : PSE(std::move(LAI.PSE)), PtrRtChecking(std::move(LAI.PtrRtChecking)), - DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), DT(LAI.DT), + DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), NumLoads(LAI.NumLoads), NumStores(LAI.NumStores), MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem), StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress), @@ -535,7 +535,6 @@ public: PtrRtChecking = std::move(LAI.PtrRtChecking); DepChecker = std::move(LAI.DepChecker); TheLoop = LAI.TheLoop; - DT = LAI.DT; NumLoads = LAI.NumLoads; NumStores = LAI.NumStores; MaxSafeDepDistBytes = LAI.MaxSafeDepDistBytes; @@ -633,7 +632,7 @@ public: private: /// \brief Analyze the loop. void analyzeLoop(AliasAnalysis *AA, LoopInfo *LI, - const TargetLibraryInfo *TLI); + const TargetLibraryInfo *TLI, DominatorTree *DT); /// \brief Check if the structure of the loop allows it to be analyzed by this /// pass. @@ -658,7 +657,6 @@ private: std::unique_ptr<MemoryDepChecker> DepChecker; Loop *TheLoop; - DominatorTree *DT; unsigned NumLoads; unsigned NumStores; diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 10e963ba1cf..0d774cf08e2 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1506,7 +1506,8 @@ bool LoopAccessInfo::canAnalyzeLoop() { } void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA, LoopInfo *LI, - const TargetLibraryInfo *TLI) { + const TargetLibraryInfo *TLI, + DominatorTree *DT) { typedef SmallPtrSet<Value*, 16> ValueSet; // Holds the Load and Store instructions. @@ -1922,10 +1923,10 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE, : PSE(llvm::make_unique<PredicatedScalarEvolution>(*SE, *L)), PtrRtChecking(llvm::make_unique<RuntimePointerChecking>(SE)), DepChecker(llvm::make_unique<MemoryDepChecker>(*PSE, L)), TheLoop(L), - DT(DT), NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1), - CanVecMem(false), StoreToLoopInvariantAddress(false) { + NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1), CanVecMem(false), + StoreToLoopInvariantAddress(false) { if (canAnalyzeLoop()) - analyzeLoop(AA, LI, TLI); + analyzeLoop(AA, LI, TLI, DT); } void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const { |