Preserve and update ETForest. Patch by Daniel Berlin

llvm-svn: 25203
This commit is contained in:
Chris Lattner 2006-01-11 05:11:13 +00:00
parent 7b7fee2d92
commit d726328ee9

View File

@ -34,6 +34,7 @@ namespace {
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<ETForest>();
AU.addPreserved<DominatorSet>();
AU.addPreserved<ImmediateDominators>();
AU.addPreserved<DominatorTree>();
@ -153,6 +154,10 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
ID->addNewBlock(NewBB, TIBB);
}
// Update the forest?
if (ETForest *EF = P->getAnalysisToUpdate<ETForest>())
EF->addNewBlock(NewBB, TIBB);
// Should we update DominatorTree information?
if (DominatorTree *DT = P->getAnalysisToUpdate<DominatorTree>()) {
DominatorTree::Node *TINode = DT->getNode(TIBB);