Register scavenger is now capable of scavenging. It spills a register whose use of...
[oota-llvm.git] / include / llvm / CodeGen / LiveInterval.h
index 863d9b5b0718e92a77b7f813d95e14c7c7ada20d..367cefeb36c0601b1d247eea85c175b73b9534f8 100644 (file)
@@ -22,6 +22,7 @@
 #define LLVM_CODEGEN_LIVEINTERVAL_H
 
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Streams.h"
 #include <iosfwd>
 #include <vector>
 #include <cassert>
@@ -55,12 +56,16 @@ namespace llvm {
     }
 
     void dump() const;
+    void print(std::ostream &os) const;
+    void print(std::ostream *os) const { if (os) print(*os); }
 
   private:
     LiveRange(); // DO NOT IMPLEMENT
   };
+
   std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
 
+
   inline bool operator<(unsigned V, const LiveRange &LR) {
     return V < LR.start;
   }
@@ -253,6 +258,9 @@ namespace llvm {
     }
 
     void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const;
+    void print(std::ostream *OS, const MRegisterInfo *MRI = 0) const {
+      if (OS) print(*OS, MRI);
+    }
     void dump() const;
 
   private: