diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-31 07:44:07 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-31 07:44:07 +0000 |
commit | 3fd7bf425789c798ec13ed3c9fdfcde26926f3d7 (patch) | |
tree | 3d4dc0fc0deecb4ab0063ea2008de2e359b11478 /include/llvm/Target | |
parent | 2263df029af68d3498099cc95276bbe2efab2204 (diff) | |
download | llvm-3fd7bf425789c798ec13ed3c9fdfcde26926f3d7.tar.gz llvm-3fd7bf425789c798ec13ed3c9fdfcde26926f3d7.tar.bz2 llvm-3fd7bf425789c798ec13ed3c9fdfcde26926f3d7.tar.xz |
Made a single common InvalidRegNum = -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetRegInfo.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 69dcadbb76..29e10d395e 100644 --- a/include/llvm/Target/TargetRegInfo.h +++ b/include/llvm/Target/TargetRegInfo.h @@ -65,6 +65,11 @@ protected: 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 @@ public: } // 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; @@ -224,11 +232,6 @@ public: 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 // an architecture. This must insert code for saving and restoring |