[llvm] r272611 - [PM/MergedLoadStoreMotion] Preserve analyses more aggressively.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 18:23:31 PDT 2016
Author: davide
Date: Mon Jun 13 20:23:31 2016
New Revision: 272611
URL: http://llvm.org/viewvc/llvm-project?rev=272611&view=rev
Log:
[PM/MergedLoadStoreMotion] Preserve analyses more aggressively.
Modified:
llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp?rev=272611&r1=272610&r2=272611&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp Mon Jun 13 20:23:31 2016
@@ -520,7 +520,12 @@ MergedLoadStoreMotionPass::run(Function
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 {
More information about the llvm-commits
mailing list