mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
[LAA] Don't hold on to TargetLibraryInfo in the analysis result
llvm-svn: 275334
This commit is contained in:
parent
fbb869fff0
commit
81d02fda32
@ -520,10 +520,9 @@ 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),
|
||||
TLI(LAI.TLI), DT(LAI.DT), NumLoads(LAI.NumLoads),
|
||||
NumStores(LAI.NumStores), MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes),
|
||||
CanVecMem(LAI.CanVecMem),
|
||||
DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), DT(LAI.DT),
|
||||
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)),
|
||||
@ -536,7 +535,6 @@ public:
|
||||
PtrRtChecking = std::move(LAI.PtrRtChecking);
|
||||
DepChecker = std::move(LAI.DepChecker);
|
||||
TheLoop = LAI.TheLoop;
|
||||
TLI = LAI.TLI;
|
||||
DT = LAI.DT;
|
||||
NumLoads = LAI.NumLoads;
|
||||
NumStores = LAI.NumStores;
|
||||
@ -634,7 +632,8 @@ public:
|
||||
|
||||
private:
|
||||
/// \brief Analyze the loop.
|
||||
void analyzeLoop(AliasAnalysis *AA, LoopInfo *LI);
|
||||
void analyzeLoop(AliasAnalysis *AA, LoopInfo *LI,
|
||||
const TargetLibraryInfo *TLI);
|
||||
|
||||
/// \brief Check if the structure of the loop allows it to be analyzed by this
|
||||
/// pass.
|
||||
@ -659,7 +658,6 @@ private:
|
||||
std::unique_ptr<MemoryDepChecker> DepChecker;
|
||||
|
||||
Loop *TheLoop;
|
||||
const TargetLibraryInfo *TLI;
|
||||
DominatorTree *DT;
|
||||
|
||||
unsigned NumLoads;
|
||||
|
@ -1505,7 +1505,8 @@ bool LoopAccessInfo::canAnalyzeLoop() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA, LoopInfo *LI) {
|
||||
void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA, LoopInfo *LI,
|
||||
const TargetLibraryInfo *TLI) {
|
||||
typedef SmallPtrSet<Value*, 16> ValueSet;
|
||||
|
||||
// Holds the Load and Store instructions.
|
||||
@ -1921,10 +1922,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),
|
||||
TLI(TLI), DT(DT), NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1),
|
||||
DT(DT), NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1),
|
||||
CanVecMem(false), StoreToLoopInvariantAddress(false) {
|
||||
if (canAnalyzeLoop())
|
||||
analyzeLoop(AA, LI);
|
||||
analyzeLoop(AA, LI, TLI);
|
||||
}
|
||||
|
||||
void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user