From dd9e9566052d02c9fa053756bb0136eb25e9018b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 11 Jan 2006 05:11:13 +0000 Subject: [PATCH] Preserve and update ETForest. Patch by Daniel Berlin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25203 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/BreakCriticalEdges.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index 7e44574a6e8..5bb7d46908c 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -34,6 +34,7 @@ namespace { virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); @@ -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()) + EF->addNewBlock(NewBB, TIBB); + // Should we update DominatorTree information? if (DominatorTree *DT = P->getAnalysisToUpdate()) { DominatorTree::Node *TINode = DT->getNode(TIBB);