[llvm] r272009 - [PM] Preserve GlobalsAA for SROA.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 06:21:17 PDT 2016
Author: davide
Date: Tue Jun 7 08:21:17 2016
New Revision: 272009
URL: http://llvm.org/viewvc/llvm-project?rev=272009&view=rev
Log:
[PM] Preserve GlobalsAA for SROA.
Differential Revision: http://reviews.llvm.org/D21040
Modified:
llvm/trunk/lib/Transforms/Scalar/SROA.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=272009&r1=272008&r2=272009&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Tue Jun 7 08:21:17 2016
@@ -4232,9 +4232,14 @@ PreservedAnalyses SROA::runImpl(Function
PostPromotionWorklist.clear();
} while (!Worklist.empty());
+ if (!Changed)
+ return PreservedAnalyses::all();
+
// FIXME: Even when promoting allocas we should preserve some abstract set of
// CFG-specific analyses.
- return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
+ PreservedAnalyses PA;
+ PA.preserve<GlobalsAA>();
+ return PA;
}
PreservedAnalyses SROA::run(Function &F, AnalysisManager<Function> &AM) {
More information about the llvm-commits
mailing list