mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[PM] Preserve the correct set of analyses for GVN.
llvm-svn: 271934
This commit is contained in:
parent
3becf3dbb5
commit
ba23c5fa4d
@ -594,7 +594,12 @@ PreservedAnalyses GVN::run(Function &F, AnalysisManager<Function> &AM) {
|
||||
auto &AA = AM.getResult<AAManager>(F);
|
||||
auto &MemDep = AM.getResult<MemoryDependenceAnalysis>(F);
|
||||
bool Changed = runImpl(F, AC, DT, TLI, AA, &MemDep);
|
||||
return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
|
||||
if (!Changed)
|
||||
return PreservedAnalyses::all();
|
||||
PreservedAnalyses PA;
|
||||
PA.preserve<DominatorTreeAnalysis>();
|
||||
PA.preserve<GlobalsAA>();
|
||||
return PA;
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
|
Loading…
x
Reference in New Issue
Block a user