Fix 80-column violations.
[oota-llvm.git] / lib / Analysis / PostDominators.cpp
index 69522e8a39dd68dae5defd23f08ac754d8740f91..cbe8d1867e4f1d3e91a4401e00aadda75b23128f 100644 (file)
@@ -28,12 +28,11 @@ using namespace llvm;
 
 char PostDominatorTree::ID = 0;
 char PostDominanceFrontier::ID = 0;
-static RegisterPass<PostDominatorTree>
-F("postdomtree", "Post-Dominator Tree Construction", true, true);
+INITIALIZE_PASS(PostDominatorTree, "postdomtree",
+                "Post-Dominator Tree Construction", true, true);
 
 bool PostDominatorTree::runOnFunction(Function &F) {
   DT->recalculate(F);
-  DEBUG(DT->print(errs()));
   return false;
 }
 
@@ -41,9 +40,8 @@ PostDominatorTree::~PostDominatorTree() {
   delete DT;
 }
 
-void PostDominatorTree::print(std::ostream &OS, const Module *) const {
-  raw_os_ostream OSS(OS);
-  DT->print(OSS);
+void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
+  DT->print(OS);
 }
 
 
@@ -55,8 +53,8 @@ FunctionPass* llvm::createPostDomTree() {
 //  PostDominanceFrontier Implementation
 //===----------------------------------------------------------------------===//
 
-static RegisterPass<PostDominanceFrontier>
-H("postdomfrontier", "Post-Dominance Frontier Construction", true, true);
+INITIALIZE_PASS(PostDominanceFrontier, "postdomfrontier",
+                "Post-Dominance Frontier Construction", true, true);
 
 const DominanceFrontier::DomSetType &
 PostDominanceFrontier::calculate(const PostDominatorTree &DT,
@@ -69,10 +67,11 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT,
   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...