diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h index f83334ac8df8..697671e7472a 100644 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h @@ -522,7 +522,7 @@ 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), DT(LAI.DT), LI(LAI.LI), NumLoads(LAI.NumLoads), + TLI(LAI.TLI), DT(LAI.DT), NumLoads(LAI.NumLoads), NumStores(LAI.NumStores), MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem), StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress), @@ -540,7 +540,6 @@ public: DL = LAI.DL; TLI = LAI.TLI; DT = LAI.DT; - LI = LAI.LI; NumLoads = LAI.NumLoads; NumStores = LAI.NumStores; MaxSafeDepDistBytes = LAI.MaxSafeDepDistBytes; @@ -637,7 +636,7 @@ public: private: /// \brief Analyze the loop. - void analyzeLoop(AliasAnalysis *AA); + void analyzeLoop(AliasAnalysis *AA, LoopInfo *LI); /// \brief Check if the structure of the loop allows it to be analyzed by this /// pass. @@ -665,7 +664,6 @@ private: const DataLayout *DL; const TargetLibraryInfo *TLI; DominatorTree *DT; - LoopInfo *LI; unsigned NumLoads; unsigned NumStores; diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index bc145c87e2f7..b092a1a39c2c 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1505,7 +1505,7 @@ bool LoopAccessInfo::canAnalyzeLoop() { return true; } -void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA) { +void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA, LoopInfo *LI) { typedef SmallPtrSet ValueSet; // Holds the Load and Store instructions. @@ -1921,11 +1921,11 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE, : PSE(llvm::make_unique(*SE, *L)), PtrRtChecking(llvm::make_unique(SE)), DepChecker(llvm::make_unique(*PSE, L)), TheLoop(L), - DL(&DL), TLI(TLI), DT(DT), LI(LI), NumLoads(0), NumStores(0), + DL(&DL), TLI(TLI), DT(DT), NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1), CanVecMem(false), StoreToLoopInvariantAddress(false) { if (canAnalyzeLoop()) - analyzeLoop(AA); + analyzeLoop(AA, LI); } void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {