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 | 95a945620cf4a739d17408273d06f597a946eb45 (patch) | |
tree | b79b117fe5e3ab6d2046c2adecc3c604549b7869 /lib/Analysis | |
parent | b5130eb0d47d69561c2b907f082a757ed38cfb32 (diff) | |
download | external_llvm-95a945620cf4a739d17408273d06f597a946eb45.zip external_llvm-95a945620cf4a739d17408273d06f597a946eb45.tar.gz external_llvm-95a945620cf4a739d17408273d06f597a946eb45.tar.bz2 |
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/PostDominators.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index 0384fad..370cd95 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/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; } |