Rename loop preheaders pass to loop simplify

llvm-svn: 9061
This commit is contained in:
Chris Lattner 2003-10-12 21:52:28 +00:00
parent efc15169f0
commit 72272a70b8
5 changed files with 13 additions and 11 deletions

View 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;
//===----------------------------------------------------------------------===//
//

View File

@ -199,7 +199,7 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addRequiredID(LoopPreheadersID);
AU.addRequiredID(LoopSimplifyID);
AU.setPreservesCFG();
}
};

View 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)

View 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

View 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);
}
};