mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 13:40:30 +00:00
[PM] Preserve the correct set of analyses for GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4b932e94b
commit
3ff92c7452
@ -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…
Reference in New Issue
Block a user