diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-12 21:52:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-12 21:52:28 +0000 |
commit | 98bf436e2e2ab463d79c54a42a46b12028905330 (patch) | |
tree | 1de25860feea0170f5215f19d15fc94bb5c639c1 | |
parent | d59128ad364b01caf6c541f02e0e9631e834eb1a (diff) | |
download | external_llvm-98bf436e2e2ab463d79c54a42a46b12028905330.zip external_llvm-98bf436e2e2ab463d79c54a42a46b12028905330.tar.gz external_llvm-98bf436e2e2ab463d79c54a42a46b12028905330.tar.bz2 |
Rename loop preheaders pass to loop simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9061 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 12 | ||||
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/BreakCriticalEdges.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/LoopSimplify.cpp | 4 |
5 files changed, 13 insertions, 11 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index dde93c8..72e260d 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/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/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 51be904..ea27715 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/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/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index a794761..5275de4 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/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/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index e37b307..99b1b2d 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/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); } }; diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 9aee1d3..718c49d 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/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 |