diff options
author | Alina Sbirlea <asbirlea@google.com> | 2019-05-14 18:07:18 +0000 |
---|---|---|
committer | Alina Sbirlea <asbirlea@google.com> | 2019-05-14 18:07:18 +0000 |
commit | 80c6e79602f396f9f7b6ce6117e868230b17aca0 (patch) | |
tree | bbe7c1aab378005ca0fa4851dba55e112ab45835 /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | 75ad8c5d63107f1c32b9ee79e57c4cf10a5d5670 (diff) | |
download | llvm-80c6e79602f396f9f7b6ce6117e868230b17aca0.zip llvm-80c6e79602f396f9f7b6ce6117e868230b17aca0.tar.gz llvm-80c6e79602f396f9f7b6ce6117e868230b17aca0.tar.bz2 |
[MemorySSA] LoopSimplify preserves MemorySSA only when flag is flipped.
LoopSimplify can preserve MemorySSA after r360270.
But the MemorySSA analysis is retrieved and preserved only when the
EnableMSSALoopDependency is set to true. Use the same conditional to
mark the pass as preserved, otherwise subsequent passes will get an
invalid analysis.
Resolves PR41853.
llvm-svn: 360697
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopSimplify.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index 4fa04d4..5ec12aa 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -768,7 +768,8 @@ namespace { AU.addPreserved<DependenceAnalysisWrapperPass>(); AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added. AU.addPreserved<BranchProbabilityInfoWrapperPass>(); - AU.addPreserved<MemorySSAWrapperPass>(); + if (EnableMSSALoopDependency) + AU.addPreserved<MemorySSAWrapperPass>(); } /// verifyAnalysis() - Verify LoopSimplifyForm's guarantees. |