diff options
author | Devang Patel <dpatel@apple.com> | 2007-06-08 00:02:08 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-06-08 00:02:08 +0000 |
commit | f86a73cbef423d56299865536f272dc1d94239f7 (patch) | |
tree | b796926967d7a7b78bcbd9b23c73840f9980f47c /lib/Transforms/Utils/BreakCriticalEdges.cpp | |
parent | 6ea7ac6a1e36f4ea44c77e5d008b0f4d2379c529 (diff) |
Do not preserve ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BreakCriticalEdges.cpp')
-rw-r--r-- | lib/Transforms/Utils/BreakCriticalEdges.cpp | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index 6ceea34270..af9a114bbe 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -40,7 +40,6 @@ namespace { virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addPreserved<ETForest>(); AU.addPreserved<DominatorTree>(); AU.addPreserved<DominanceFrontier>(); AU.addPreserved<LoopInfo>(); @@ -110,11 +109,11 @@ bool llvm::isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum, } // SplitCriticalEdge - If this edge is a critical edge, insert a new node to -// split the critical edge. This will update ETForest, ImmediateDominator, -// DominatorTree, and DominatorFrontier information if it is available, thus -// calling this pass will not invalidate any of them. This returns true if -// the edge was split, false otherwise. This ensures that all edges to that -// dest go to one block instead of each going to a different block. +// split the critical edge. This will update DominatorTree, and DominatorFrontier +// information if it is available, thus calling this pass will not invalidate +// any of them. This returns true if the edge was split, false otherwise. +// This ensures that all edges to that dest go to one block instead of each +// going to a different block. // bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P, bool MergeIdenticalEdges) { @@ -181,26 +180,6 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P, bool NewBBDominatesDestBB = true; - // Update the forest? - if (ETForest *EF = P->getAnalysisToUpdate<ETForest>()) { - // NewBB is dominated by TIBB. - EF->addNewBlock(NewBB, TIBB); - - // If NewBBDominatesDestBB hasn't been computed yet, do so with EF. - if (!OtherPreds.empty()) { - while (!OtherPreds.empty() && NewBBDominatesDestBB) { - NewBBDominatesDestBB = EF->dominates(DestBB, OtherPreds.back()); - OtherPreds.pop_back(); - } - OtherPreds.clear(); - } - - // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it - // doesn't dominate anything. - if (NewBBDominatesDestBB) - EF->setImmediateDominator(DestBB, NewBB); - } - // Should we update DominatorTree information? if (DominatorTree *DT = P->getAnalysisToUpdate<DominatorTree>()) { DomTreeNode *TINode = DT->getNode(TIBB); |