[llvm] r271149 - [PM] SCCP should preserve GlobalsAA even if the IR is mutated.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat May 28 17:31:27 PDT 2016
Author: davide
Date: Sat May 28 19:31:15 2016
New Revision: 271149
URL: http://llvm.org/viewvc/llvm-project?rev=271149&view=rev
Log:
[PM] SCCP should preserve GlobalsAA even if the IR is mutated.
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=271149&r1=271148&r2=271149&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Sat May 28 19:31:15 2016
@@ -1629,7 +1629,10 @@ PreservedAnalyses SCCPPass::run(Function
auto &TLI = AM.getResult<TargetLibraryAnalysis>(F);
if (!runSCCP(F, DL, &TLI))
return PreservedAnalyses::all();
- return PreservedAnalyses::none();
+
+ auto PA = PreservedAnalyses();
+ PA.preserve<GlobalsAA>();
+ return PA;
}
namespace {
More information about the llvm-commits
mailing list