summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2018-09-06 20:54:24 +0000
committerAlina Sbirlea <asbirlea@google.com>2018-09-06 20:54:24 +0000
commitb23648cfdb5add073e968d76061b9e78f9cd2f10 (patch)
tree502fb8d47389caca2723b787fd85b833cd1570cf
parenta3735821697d4c189c7f8acf97d9c316336b0fb2 (diff)
downloadbcm5719-llvm-b23648cfdb5add073e968d76061b9e78f9cd2f10.tar.gz
bcm5719-llvm-b23648cfdb5add073e968d76061b9e78f9cd2f10.zip
[LoopPassManager] MemorySSA should be preserved when enabled.
llvm-svn: 341587
-rw-r--r--llvm/include/llvm/Transforms/Scalar/LoopPassManager.h4
-rw-r--r--llvm/lib/Analysis/LoopAnalysisManager.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
index 5f61c39b553..0d691f3fee4 100644
--- a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
+++ b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
@@ -364,8 +364,8 @@ public:
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LoopAnalysis>();
PA.preserve<ScalarEvolutionAnalysis>();
- // FIXME: Uncomment this when all loop passes preserve MemorySSA
- // PA.preserve<MemorySSAAnalysis>();
+ if (EnableMSSALoopDependency)
+ PA.preserve<MemorySSAAnalysis>();
// FIXME: What we really want to do here is preserve an AA category, but
// that concept doesn't exist yet.
PA.preserve<AAManager>();
diff --git a/llvm/lib/Analysis/LoopAnalysisManager.cpp b/llvm/lib/Analysis/LoopAnalysisManager.cpp
index 074023a7e1e..2a3b29d7fbc 100644
--- a/llvm/lib/Analysis/LoopAnalysisManager.cpp
+++ b/llvm/lib/Analysis/LoopAnalysisManager.cpp
@@ -147,8 +147,8 @@ PreservedAnalyses llvm::getLoopPassPreservedAnalyses() {
PA.preserve<LoopAnalysis>();
PA.preserve<LoopAnalysisManagerFunctionProxy>();
PA.preserve<ScalarEvolutionAnalysis>();
- // FIXME: Uncomment this when all loop passes preserve MemorySSA
- // PA.preserve<MemorySSAAnalysis>();
+ if (EnableMSSALoopDependency)
+ PA.preserve<MemorySSAAnalysis>();
// FIXME: What we really want to do here is preserve an AA category, but that
// concept doesn't exist yet.
PA.preserve<AAManager>();
OpenPOWER on IntegriCloud