From 52a58efbfad00aa1ad801c28fe5f656c70d7f465 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 14 Jun 2016 01:23:31 +0000 Subject: [PATCH] [PM/MergedLoadStoreMotion] Preserve analyses more aggressively. llvm-svn: 272611 --- lib/Transforms/Scalar/MergedLoadStoreMotion.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 {