From d20cc14dbf6d54d896e67b9920cd9bccdc14c41a Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 23 Oct 2007 20:58:37 +0000 Subject: 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 --- lib/Analysis/PostDominators.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'lib/Analysis/PostDominators.cpp') diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index 0384fad732..370cd95529 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -29,25 +29,7 @@ static RegisterPass 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(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, GraphTraits > >(*this, F); + DT->recalculate(F); return false; } -- cgit v1.2.3-70-g09d2