From 3dc6776b338f81e2d47daa42cc12c9f91053043d Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Sun, 15 Apr 2007 08:47:27 +0000 Subject: Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for constructing ImmediateDominator is now folded into DomTree construction. This is part of the ongoing work for PR217. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36063 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/BreakCriticalEdges.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'lib/Transforms/Utils/BreakCriticalEdges.cpp') diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index 2f91e57..2cf2ecd 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -38,7 +38,6 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved(); - AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); @@ -196,29 +195,6 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P, if (NewBBDominatesDestBB) EF->setImmediateDominator(DestBB, NewBB); } - - // Should we update ImmediateDominator information? - if (ImmediateDominators *ID = P->getAnalysisToUpdate()) { - // Only do this if TIBB is reachable. - if (ID->get(TIBB) || &TIBB->getParent()->getEntryBlock() == TIBB) { - // TIBB is the new immediate dominator for NewBB. - ID->addNewBlock(NewBB, TIBB); - - // If NewBBDominatesDestBB hasn't been computed yet, do so with ID. - if (!OtherPreds.empty()) { - while (!OtherPreds.empty() && NewBBDominatesDestBB) { - NewBBDominatesDestBB = ID->dominates(DestBB, OtherPreds.back()); - OtherPreds.pop_back(); - } - OtherPreds.clear(); - } - - // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it - // doesn't dominate anything. - if (NewBBDominatesDestBB) - ID->setImmediateDominator(DestBB, NewBB); - } - } // Should we update DominatorTree information? if (DominatorTree *DT = P->getAnalysisToUpdate()) { -- cgit v1.1