[PATCH] D60832: [MemorySSA] LCSSA preserves MemorySSA.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 13:58:04 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL359032: [MemorySSA] LCSSA preserves MemorySSA. (authored by asbirlea, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60832/new/
https://reviews.llvm.org/D60832
Files:
llvm/trunk/include/llvm/Analysis/LoopAnalysisManager.h
llvm/trunk/include/llvm/Analysis/MemorySSA.h
llvm/trunk/lib/Analysis/LoopAnalysisManager.cpp
llvm/trunk/lib/Analysis/MemorySSA.cpp
llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Index: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
+++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
@@ -34,9 +34,9 @@
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/LoopPass.h"
+#include "llvm/Analysis/MemorySSA.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
-#include "llvm/Transforms/Utils/Local.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
@@ -45,6 +45,7 @@
#include "llvm/IR/PredIteratorCache.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils.h"
+#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
using namespace llvm;
@@ -444,6 +445,7 @@
AU.addPreserved<ScalarEvolutionWrapperPass>();
AU.addPreserved<SCEVAAWrapperPass>();
AU.addPreserved<BranchProbabilityInfoWrapperPass>();
+ AU.addPreserved<MemorySSAWrapperPass>();
// This is needed to perform LCSSA verification inside LPPassManager
AU.addRequired<LCSSAVerificationPass>();
@@ -490,5 +492,6 @@
// BPI maps terminators to probabilities, since we don't modify the CFG, no
// updates are needed to preserve it.
PA.preserve<BranchProbabilityAnalysis>();
+ PA.preserve<MemorySSAAnalysis>();
return PA;
}
Index: llvm/trunk/lib/Analysis/MemorySSA.cpp
===================================================================
--- llvm/trunk/lib/Analysis/MemorySSA.cpp
+++ llvm/trunk/lib/Analysis/MemorySSA.cpp
@@ -81,6 +81,11 @@
#else
bool llvm::VerifyMemorySSA = false;
#endif
+/// Enables memory ssa as a dependency for loop passes in legacy pass manager.
+cl::opt<bool> llvm::EnableMSSALoopDependency(
+ "enable-mssa-loop-dependency", cl::Hidden, cl::init(false),
+ cl::desc("Enable MemorySSA dependency for loop pass manager"));
+
static cl::opt<bool, true>
VerifyMemorySSAX("verify-memoryssa", cl::location(VerifyMemorySSA),
cl::Hidden, cl::desc("Enable verification of MemorySSA."));
Index: llvm/trunk/lib/Analysis/LoopAnalysisManager.cpp
===================================================================
--- llvm/trunk/lib/Analysis/LoopAnalysisManager.cpp
+++ llvm/trunk/lib/Analysis/LoopAnalysisManager.cpp
@@ -18,11 +18,6 @@
using namespace llvm;
namespace llvm {
-/// Enables memory ssa as a dependency for loop passes in legacy pass manager.
-cl::opt<bool> EnableMSSALoopDependency(
- "enable-mssa-loop-dependency", cl::Hidden, cl::init(false),
- cl::desc("Enable MemorySSA dependency for loop pass manager"));
-
// Explicit template instantiations and specialization definitions for core
// template typedefs.
template class AllAnalysesOn<Loop>;
Index: llvm/trunk/include/llvm/Analysis/LoopAnalysisManager.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/LoopAnalysisManager.h
+++ llvm/trunk/include/llvm/Analysis/LoopAnalysisManager.h
@@ -61,9 +61,6 @@
MemorySSA *MSSA;
};
-/// Enables memory ssa as a dependency for loop passes.
-extern cl::opt<bool> EnableMSSALoopDependency;
-
/// Extern template declaration for the analysis set for this IR unit.
extern template class AllAnalysesOn<Loop>;
Index: llvm/trunk/include/llvm/Analysis/MemorySSA.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/MemorySSA.h
+++ llvm/trunk/include/llvm/Analysis/MemorySSA.h
@@ -104,6 +104,9 @@
namespace llvm {
+/// Enables memory ssa as a dependency for loop passes.
+extern cl::opt<bool> EnableMSSALoopDependency;
+
class Function;
class Instruction;
class MemoryAccess;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60832.196322.patch
Type: text/x-patch
Size: 3828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190423/0dd9b73d/attachment.bin>
More information about the llvm-commits
mailing list