forked from OSchip/llvm-project
[PM] SCCP should preserve GlobalsAA even if the IR is mutated.
llvm-svn: 271149
This commit is contained in:
parent
e6c8fa4530
commit
484b5ab39d
|
@ -1629,7 +1629,10 @@ PreservedAnalyses SCCPPass::run(Function &F, AnalysisManager<Function> &AM) {
|
|||
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 {
|
||||
|
|
Loading…
Reference in New Issue