[llvm-commits] CVS: llvm/include/llvm/Target/TargetRegInfo.h

Vikram Adve vadve at cs.uiuc.edu
Sat May 31 02:45:02 PDT 2003


Changes in directory llvm/include/llvm/Target:

TargetRegInfo.h updated: 1.35 -> 1.36

---
Log message:

Made a single common InvalidRegNum = -1.


---
Diffs of the changes:

Index: llvm/include/llvm/Target/TargetRegInfo.h
diff -u llvm/include/llvm/Target/TargetRegInfo.h:1.35 llvm/include/llvm/Target/TargetRegInfo.h:1.36
--- llvm/include/llvm/Target/TargetRegInfo.h:1.35	Thu May 29 00:00:14 2003
+++ llvm/include/llvm/Target/TargetRegInfo.h	Sat May 31 02:44:07 2003
@@ -65,6 +65,11 @@
 public:
   const TargetMachine ⌖
 
+  // A register can be initialized to an invalid number. That number can
+  // be obtained using this method.
+  //
+  static int getInvalidRegNum() { return -1; }
+
   TargetRegInfo(const TargetMachine& tgt) : target(tgt) { }
   ~TargetRegInfo() {
     for (unsigned i = 0, e = MachineRegClassArr.size(); i != e; ++i)
@@ -209,12 +214,15 @@
   }
   
   // Returns the assembly-language name of the specified machine register.
+  // 
   const char * const getUnifiedRegName(int UnifiedRegNum) const {
     unsigned regClassID = getNumOfRegClasses(); // initialize to invalid value
     int regNumInClass = getClassRegNum(UnifiedRegNum, regClassID);
     return MachineRegClassArr[regClassID]->getRegName(regNumInClass);
   }
 
+  // Get the register type for a register identified different ways.
+  // 
   virtual int getRegType(const Type* type) const = 0;
   virtual int getRegType(const LiveRange *LR) const = 0;
   virtual int getRegType(int unifiedRegNum) const = 0;
@@ -223,11 +231,6 @@
   // 
   virtual unsigned getFramePointer() const = 0;
   virtual unsigned getStackPointer() const = 0;
-
-  // A register can be initialized to an invalid number. That number can
-  // be obtained using this method.
-  //
-  virtual int getInvalidRegNum() const = 0;
 
   // Method for inserting caller saving code. The caller must save all the
   // volatile registers across a call based on the calling conventions of





More information about the llvm-commits mailing list