Factor the calculation details for PostDomTree out of PostDominators.cpp and
[oota-llvm.git] / include / llvm / Analysis / IntervalPartition.h
index 1cc903cae1db1ba559802f95cf9ba497b588792c..1f985e37d6456d5dc299f6ec40dc0efa5a5e19e1 100644 (file)
@@ -45,7 +45,9 @@ class IntervalPartition : public FunctionPass {
   std::vector<Interval*> Intervals;
 
 public:
-  IntervalPartition() : RootInterval(0) {}
+  static char ID; // Pass identification, replacement for typeid
+
+  IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
 
   // run - Calculate the interval partition for this function
   virtual bool runOnFunction(Function &F);
@@ -61,6 +63,9 @@ public:
 
   // print - Show contents in human readable format...
   virtual void print(std::ostream &O, const Module* = 0) const;
+  void print(std::ostream *O, const Module* M = 0) const {
+    if (O) print(*O, M);
+  }
 
   // getRootInterval() - Return the root interval that contains the starting
   // block of the function.