Preserve and update ETForest. Patch by Daniel Berlin
authorChris Lattner <sabre@nondot.org>
Wed, 11 Jan 2006 05:11:13 +0000 (05:11 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 11 Jan 2006 05:11:13 +0000 (05:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25203 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/BreakCriticalEdges.cpp

index 7e44574a6e864b96031964094dd581753a6223e2..5bb7d46908c56bcd0744663935e7d4f6608e7c47 100644 (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);