Rename loop preheaders pass to loop simplify
authorChris Lattner <sabre@nondot.org>
Sun, 12 Oct 2003 21:52:28 +0000 (21:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Oct 2003 21:52:28 +0000 (21:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9061 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Scalar.h
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Utils/LoopSimplify.cpp

index dde93c8c0346700ae2d2428ff7d46ff7d32898c5..72e260d94a708b20b933e6fb7eee846e4bf84540 100644 (file)
@@ -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;
 
 //===----------------------------------------------------------------------===//
 // 
index 51be904931e7530857727302a998396beec092c1..ea27715dbee1dc3d86bbe3f2e044226493a19260 100644 (file)
@@ -199,7 +199,7 @@ namespace {
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<LoopInfo>();
-      AU.addRequiredID(LoopPreheadersID);
+      AU.addRequiredID(LoopSimplifyID);
       AU.setPreservesCFG();
     }
   };
index a794761a4efefd80c5f84b0702eaa47888f200d7..5275de4d59177a63e867dd59cd28adc3c5818da7 100644 (file)
@@ -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)
index e37b307de8b0c6a815270481adf5ff5c1b99541d..99b1b2dfd0a1d2605862b85a0334242463c3d10a 100644 (file)
@@ -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);
     }
   };
 
index 9aee1d358680157039d6466addb5ed51afe4c749..718c49da43c54f16f0c8f65d66fb6454efc93638 100644 (file)
@@ -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