summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Transforms/Scalar.h12
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/LoopSimplify.cpp4
-rw-r--r--llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp4
5 files changed, 13 insertions, 11 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h
index dde93c8c034..72e260d94a7 100644
--- a/llvm/include/llvm/Transforms/Scalar.h
+++ b/llvm/include/llvm/Transforms/Scalar.h
@@ -232,14 +232,14 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P = 0);
//===----------------------------------------------------------------------===//
//
-// LoopPreheaders pass - Insert Pre-header blocks into the CFG for every
-// function in the module. This pass updates dominator information, loop
-// information, and does not add critical edges to the CFG.
+// LoopSimplify pass - Insert Pre-header blocks into the CFG for every function
+// in the module. This pass updates dominator information, loop information,
+// and does not add critical edges to the CFG.
//
-// AU.addRequiredID(LoopPreheadersID);
+// AU.addRequiredID(LoopSimplifyID);
//
-Pass *createLoopPreheaderInsertionPass();
-extern const PassInfo *LoopPreheadersID;
+Pass *createLoopSimplifyPass();
+extern const PassInfo *LoopSimplifyID;
//===----------------------------------------------------------------------===//
//
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 51be904931e..ea27715dbee 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -199,7 +199,7 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
- AU.addRequiredID(LoopPreheadersID);
+ AU.addRequiredID(LoopSimplifyID);
AU.setPreservesCFG();
}
};
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index a794761a4ef..5275de4d591 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -53,7 +53,7 @@ namespace {
///
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
- AU.addRequiredID(LoopPreheadersID);
+ AU.addRequiredID(LoopSimplifyID);
AU.addRequired<LoopInfo>();
AU.addRequired<DominatorTree>();
AU.addRequired<DominanceFrontier>(); // For scalar promotion (mem2reg)
diff --git a/llvm/lib/Transforms/Scalar/LoopSimplify.cpp b/llvm/lib/Transforms/Scalar/LoopSimplify.cpp
index 9aee1d35868..718c49da43c 100644
--- a/llvm/lib/Transforms/Scalar/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopSimplify.cpp
@@ -66,8 +66,8 @@ namespace {
}
// Publically exposed interface to pass...
-const PassInfo *LoopPreheadersID = X.getPassInfo();
-Pass *createLoopPreheaderInsertionPass() { return new LoopSimplify(); }
+const PassInfo *LoopSimplifyID = X.getPassInfo();
+Pass *createLoopSimplifyPass() { return new LoopSimplify(); }
/// runOnFunction - Run down all loops in the CFG (recursively, but we could do
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
index e37b307de8b..99b1b2dfd0a 100644
--- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -27,7 +27,9 @@ namespace {
AU.addPreserved<ImmediateDominators>();
AU.addPreserved<DominatorTree>();
AU.addPreserved<DominanceFrontier>();
- AU.addPreservedID(LoopPreheadersID); // No preheaders deleted.
+
+ // No loop canonicalization guarantees are broken by this pass.
+ AU.addPreservedID(LoopSimplifyID);
}
};
OpenPOWER on IntegriCloud