Add -analyze support to postdomtree.
authorDan Gohman <gohman@apple.com>
Wed, 27 Feb 2008 18:38:29 +0000 (18:38 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 27 Feb 2008 18:38:29 +0000 (18:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47680 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/Dominators.h
include/llvm/Analysis/PostDominators.h

index 517c4818b1a56baadf7c23f2a3caa94ff277e023..ce305d5875e0c38b1e3d193f9cdc449def53c5b6 100644 (file)
@@ -508,7 +508,10 @@ public:
   ///
   virtual void print(std::ostream &o, const Module* ) const {
     o << "=============================--------------------------------\n";
-    o << "Inorder Dominator Tree: ";
+    if (this->isPostDominator())
+      o << "Inorder PostDominator Tree: ";
+    else
+      o << "Inorder Dominator Tree: ";
     if (this->DFSInfoValid)
       o << "DFSNumbers invalid: " << SlowQueries << " slow queries.";
     o << "\n";
index 77ce4cddd252439ca551aa0496939334786deaf8..07910e9538c7cb6c013322bab035755916787d3b 100644 (file)
@@ -54,6 +54,10 @@ struct PostDominatorTree : public FunctionPass {
   inline bool properlyDominates(BasicBlock* A, BasicBlock* B) const {
     return DT->properlyDominates(A, B);
   }
+
+  virtual void print(std::ostream &OS, const Module* M= 0) const {
+    DT->print(OS, M);
+  }
 };