summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-04-15 08:47:27 +0000
committerOwen Anderson <resistor@mac.com>2007-04-15 08:47:27 +0000
commitf35a1dbc7ac0046a494cb66945096101ef3fcac6 (patch)
tree0795aec122dd5328f480e0744112594c98738da5 /llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
parent951d8dc29fff7ab225affb2b5b00f053a98495f6 (diff)
downloadbcm5719-llvm-f35a1dbc7ac0046a494cb66945096101ef3fcac6.tar.gz
bcm5719-llvm-f35a1dbc7ac0046a494cb66945096101ef3fcac6.zip
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. llvm-svn: 36063
Diffstat (limited to 'llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 2f91e575908..2cf2ecd3e96 100644
--- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -38,7 +38,6 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<ETForest>();
- AU.addPreserved<ImmediateDominators>();
AU.addPreserved<DominatorTree>();
AU.addPreserved<DominanceFrontier>();
AU.addPreserved<LoopInfo>();
@@ -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<ImmediateDominators>()) {
- // 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<DominatorTree>()) {
OpenPOWER on IntegriCloud