git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271934
91177308-0d34-0410-b5e6-
96231b3b80d8
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