Use TRI::printReg instead of AbstractRegisterDescription when printing
[oota-llvm.git] / lib / CodeGen / LiveIntervalUnion.h
index 5bf86d8c02531db2d025e04c3c64bd92c0fbe933..92d248266e0a0a2d88340503870dbefc5f69829b 100644 (file)
 
 namespace llvm {
 
+class TargetRegisterInfo;
+
 #ifndef NDEBUG
 // forward declaration
 template <unsigned Element> class SparseBitVector;
 typedef SparseBitVector<128> LiveVirtRegBitSet;
 #endif
 
-/// Abstraction to provide info for the representative register.
-class AbstractRegisterDescription {
-public:
-  virtual const char *getName(unsigned Reg) const = 0;
-  virtual ~AbstractRegisterDescription() {}
-};
-
 /// Compare a live virtual register segment to a LiveIntervalUnion segment.
 inline bool
 overlap(const LiveRange &VRSeg,
@@ -85,10 +80,8 @@ public:
   // Remove a live virtual register's segments from this union.
   void extract(LiveInterval &VirtReg);
 
-  void dump(const AbstractRegisterDescription *RegDesc) const;
-
-  // If tri != NULL, use it to decode RepReg
-  void print(raw_ostream &OS, const AbstractRegisterDescription *RegDesc) const;
+  // Print union, using TRI to translate register names
+  void print(raw_ostream &OS, const TargetRegisterInfo *TRI) const;
 
 #ifndef NDEBUG
   // Verify the live intervals in this union and add them to the visited set.