summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitf35a1dbc7ac0046a494cb66945096101ef3fcac6 (patch)
tree0795aec122dd5328f480e0744112594c98738da5 /llvm/lib/Transforms/Utils/LoopSimplify.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/LoopSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 75991688b10..7d34b95cba5 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/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>()) {
OpenPOWER on IntegriCloud