From: Davide Italiano Date: Tue, 14 Jun 2016 01:23:31 +0000 (+0000) Subject: [PM/MergedLoadStoreMotion] Preserve analyses more aggressively. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1a1144732a24aa7db64db1ce8a0e6c37f935316;p=llvm [PM/MergedLoadStoreMotion] Preserve analyses more aggressively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272611 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp b/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp index 251650c5539..12ee3d8da6a 100644 --- a/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp +++ b/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp @@ -520,7 +520,12 @@ MergedLoadStoreMotionPass::run(Function &F, AnalysisManager &AM) { auto *MD = AM.getCachedResult(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(); + PA.preserve(); + return PA; } namespace {