Expose base register for DwarfWriter. Refactor code accordingly.
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9RegInfo.h
index b3c78f3b74f8a6c9b3bfaa52813ff54f5c5d7667..a992b31aa45a67fdc920ce559e051aaeb11d7971 100644 (file)
@@ -27,7 +27,7 @@ class Type;
 class Value;
 class LiveRangeInfo;
 class Function;
-class LiveRange;
+class V9LiveRange;
 class AddedInstrns;
 class MachineInstr;
 class BasicBlock;
@@ -45,6 +45,8 @@ protected:
   const unsigned NumOfAllRegs;      // # of all registers -including SP,g0 etc.
 
 public:
+  virtual ~TargetRegClassInfo() {}
+
   inline unsigned getRegClassID()     const { return RegClassID; }
   inline unsigned getNumOfAvailRegs() const { return NumOfAvailRegs; }
   inline unsigned getNumOfAllRegs()   const { return NumOfAllRegs; }
@@ -127,7 +129,7 @@ public:
   // To find the register class used for a specified Type
   //
   unsigned getRegClassIDOfType  (const Type *type,
-                                        bool isCCReg = false) const;
+                                         bool isCCReg = false) const;
 
   // To find the register class to which a specified register belongs
   //
@@ -163,7 +165,7 @@ public:
                                     LiveRangeInfo& LRI) const;
 
   void suggestReg4RetValue(MachineInstr *RetI,
-                                  LiveRangeInfo& LRI) const;
+                                   LiveRangeInfo& LRI) const;
 
   void colorMethodArgs(const Function *Func,
                            LiveRangeInfo &LRI,
@@ -257,7 +259,7 @@ private:
   // as required. See SparcV9RegInfo.cpp for the implementation.
   //
   void suggestReg4RetAddr(MachineInstr *RetMI,
-                         LiveRangeInfo &LRI) const;
+                          LiveRangeInfo &LRI) const;
 
   void suggestReg4CallAddr(MachineInstr *CallMI, LiveRangeInfo &LRI) const;
 
@@ -322,7 +324,7 @@ public:
 
   // method used for printing a register for debugging purposes
   //
-  void printReg(const LiveRange *LR) const;
+  void printReg(const V9LiveRange *LR) const;
 
   // To obtain the return value and the indirect call address (if any)
   // contained in a CALL machine instruction
@@ -367,7 +369,7 @@ public:
   // The reg class of a LR depends both on the Value types in it and whether
   // they are CC registers or not (for example).
   int getRegTypeForDataType(const Type* type) const;
-  int getRegTypeForLR(const LiveRange *LR) const;
+  int getRegTypeForLR(const V9LiveRange *LR) const;
   int getRegType(int unifiedRegNum) const;
 
   unsigned getFramePointer() const;