diff options
author | Owen Anderson <resistor@mac.com> | 2007-10-23 20:58:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-10-23 20:58:37 +0000 |
commit | 9c614117da496ee58f64d5bf0708d55737445452 (patch) | |
tree | 9aa2a64ac01635d15e2ec0e23bdc9d2dd3838367 /llvm/lib/Analysis/PostDominators.cpp | |
parent | 30efa2eec9818a05c1beb3f9fc378e6d20ad3861 (diff) | |
download | bcm5719-llvm-9c614117da496ee58f64d5bf0708d55737445452.tar.gz bcm5719-llvm-9c614117da496ee58f64d5bf0708d55737445452.zip |
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
llvm-svn: 43259
Diffstat (limited to 'llvm/lib/Analysis/PostDominators.cpp')
-rw-r--r-- | llvm/lib/Analysis/PostDominators.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp index 0384fad732e..370cd955299 100644 --- a/llvm/lib/Analysis/PostDominators.cpp +++ b/llvm/lib/Analysis/PostDominators.cpp @@ -29,25 +29,7 @@ static RegisterPass<PostDominatorTree> F("postdomtree", "Post-Dominator Tree Construction", true); bool PostDominatorTree::runOnFunction(Function &F) { - reset(); // Reset from the last time we were run... - - // Initialize the roots list - for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) { - TerminatorInst *Insn = I->getTerminator(); - if (Insn->getNumSuccessors() == 0) { - // Unreachable block is not a root node. - if (!isa<UnreachableInst>(Insn)) - Roots.push_back(I); - } - - // Prepopulate maps so that we don't get iterator invalidation issues later. - IDoms[I] = 0; - DomTreeNodes[I] = 0; - } - - Vertex.push_back(0); - - Calculate<Inverse<BasicBlock*>, GraphTraits<Inverse<BasicBlock*> > >(*this, F); + DT->recalculate(F); return false; } |