From: Vikram S. Adve Date: Sat, 31 May 2003 07:44:07 +0000 (+0000) Subject: Made a single common InvalidRegNum = -1. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3fd7bf425789c798ec13ed3c9fdfcde26926f3d7;p=oota-llvm.git Made a single common InvalidRegNum = -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6473 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 69dcadbb763..29e10d395e5 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