bool PostDominatorTree::runOnFunction(Function &F) {
DT->recalculate(F);
- DEBUG(DT->dump());
return false;
}
-PostDominatorTree::~PostDominatorTree()
-{
+PostDominatorTree::~PostDominatorTree() {
delete DT;
}
+void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
+ DT->print(OS);
+}
+
+
FunctionPass* llvm::createPostDomTree() {
return new PostDominatorTree();
}
if (BB)
for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB);
SI != SE; ++SI) {
+ BasicBlock *P = *SI;
// Does Node immediately dominate this predecessor?
- DomTreeNode *SINode = DT[*SI];
+ DomTreeNode *SINode = DT[P];
if (SINode && SINode->getIDom() != Node)
- S.insert(*SI);
+ S.insert(P);
}
// At this point, S is DFlocal. Now we union in DFup's of our children...