summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LoopSimplify.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
commit3dc6776b338f81e2d47daa42cc12c9f91053043d (patch)
tree810e120395e315d2c0e11e0da643422ab5e72f4b /lib/Transforms/Utils/LoopSimplify.cpp
parent2aabd0722d68ee53af9ad7140d1c0b853b6fe421 (diff)
downloadllvm-3dc6776b338f81e2d47daa42cc12c9f91053043d.tar.gz
llvm-3dc6776b338f81e2d47daa42cc12c9f91053043d.tar.bz2
llvm-3dc6776b338f81e2d47daa42cc12c9f91053043d.tar.xz
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
Diffstat (limited to 'lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 75991688b1..7d34b95cba 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -68,7 +68,6 @@ namespace {
AU.addRequired<ETForest>();
AU.addPreserved<LoopInfo>();
- AU.addPreserved<ImmediateDominators>();
AU.addPreserved<ETForest>();
AU.addPreserved<DominatorTree>();
AU.addPreserved<DominanceFrontier>();
@@ -749,31 +748,6 @@ void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB,
}
BasicBlock *NewBBIDom = 0;
-
- // Update immediate dominator information if we have it.
- if (ImmediateDominators *ID = getAnalysisToUpdate<ImmediateDominators>()) {
- unsigned i = 0;
- for (i = 0; i < PredBlocks.size(); ++i)
- if (ETF.dominates(&PredBlocks[i]->getParent()->getEntryBlock(), PredBlocks[i])) {
- NewBBIDom = PredBlocks[i];
- break;
- }
- assert(i != PredBlocks.size() && "No reachable preds?");
- for (i = i + 1; i < PredBlocks.size(); ++i) {
- if (ETF.dominates(&PredBlocks[i]->getParent()->getEntryBlock(), PredBlocks[i]))
- NewBBIDom = ETF.nearestCommonDominator(NewBBIDom, PredBlocks[i]);
- }
- assert(NewBBIDom && "No immediate dominator found??");
-
- // Set the immediate dominator now...
- ID->addNewBlock(NewBB, NewBBIDom);
-
- // If NewBB strictly dominates other blocks, we need to update their idom's
- // now. The only block that need adjustment is the NewBBSucc block, whose
- // idom should currently be set to PredBlocks[0].
- if (NewBBDominatesNewBBSucc)
- ID->setImmediateDominator(NewBBSucc, NewBB);
- }
// Update DominatorTree information if it is active.
if (DominatorTree *DT = getAnalysisToUpdate<DominatorTree>()) {