1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[PM/MergedLoadStoreMotion] Preserve analyses more aggressively.

llvm-svn: 272611
This commit is contained in:
Davide Italiano 2016-06-14 01:23:31 +00:00
parent 912c15acd4
commit 52a58efbfa

View File

@ -520,7 +520,12 @@ MergedLoadStoreMotionPass::run(Function &F, AnalysisManager<Function> &AM) {
auto *MD = AM.getCachedResult<MemoryDependenceAnalysis>(F);
if (!runMergedLoadStoreMotion(F, &AA, MD))
return PreservedAnalyses::all();
return PreservedAnalyses::none();
// FIXME: This pass should also 'preserve the CFG'.
// The new pass manager has currently no way to do it.
PreservedAnalyses PA;
PA.preserve<GlobalsAA>();
PA.preserve<MemoryDependenceAnalysis>();
return PA;
}
namespace {