Changes in directory llvm/lib/Analysis:
PostDominators.cpp updated: 1.62 -> 1.63 --- Log message: Completely purge DomSet. This is the (hopefully) final patch for PR1171: http://llvm.org/PR1171 . --- Diffs of the changes: (+0 -67) PostDominators.cpp | 67 ----------------------------------------------------- 1 files changed, 67 deletions(-) Index: llvm/lib/Analysis/PostDominators.cpp diff -u llvm/lib/Analysis/PostDominators.cpp:1.62 llvm/lib/Analysis/PostDominators.cpp:1.63 --- llvm/lib/Analysis/PostDominators.cpp:1.62 Fri Nov 17 01:10:51 2006 +++ llvm/lib/Analysis/PostDominators.cpp Sat Apr 7 02:17:27 2007 @@ -167,73 +167,6 @@ } //===----------------------------------------------------------------------===// -// PostDominatorSet Implementation -//===----------------------------------------------------------------------===// - -static RegisterPass<PostDominatorSet> -B("postdomset", "Post-Dominator Set Construction", true); - -// Postdominator set construction. This converts the specified function to only -// have a single exit node (return stmt), then calculates the post dominance -// sets for the function. -// -bool PostDominatorSet::runOnFunction(Function &F) { - // Scan the function looking for the root nodes of the post-dominance - // relationships. These blocks end with return and unwind instructions. - // While we are iterating over the function, we also initialize all of the - // domsets to empty. - Roots.clear(); - for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - if (succ_begin(I) == succ_end(I)) - Roots.push_back(I); - - // If there are no exit nodes for the function, postdomsets are all empty. - // This can happen if the function just contains an infinite loop, for - // example. - ImmediatePostDominators &IPD = getAnalysis<ImmediatePostDominators>(); - Doms.clear(); // Reset from the last time we were run... - if (Roots.empty()) return false; - - // If we have more than one root, we insert an artificial "null" exit, which - // has "virtual edges" to each of the real exit nodes. - //if (Roots.size() > 1) - // Doms[0].insert(0); - - // Root nodes only dominate themselves. - for (unsigned i = 0, e = Roots.size(); i != e; ++i) - Doms[Roots[i]].insert(Roots[i]); - - // Loop over all of the blocks in the function, calculating dominator sets for - // each function. - for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - if (BasicBlock *IPDom = IPD[I]) { // Get idom if block is reachable - DomSetType &DS = Doms[I]; - assert(DS.empty() && "PostDomset already filled in for this block?"); - DS.insert(I); // Blocks always dominate themselves - - // Insert all dominators into the set... - while (IPDom) { - // If we have already computed the dominator sets for our immediate post - // dominator, just use it instead of walking all the way up to the root. - DomSetType &IPDS = Doms[IPDom]; - if (!IPDS.empty()) { - DS.insert(IPDS.begin(), IPDS.end()); - break; - } else { - DS.insert(IPDom); - IPDom = IPD[IPDom]; - } - } - } else { - // Ensure that every basic block has at least an empty set of nodes. This - // is important for the case when there is unreachable blocks. - Doms[I]; - } - - return false; -} - -//===----------------------------------------------------------------------===// // PostDominatorTree Implementation //===----------------------------------------------------------------------===// _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits