From c1a29f10a6f0bc3d219db9594ed8d3ec20efd8a4 Mon Sep 17 00:00:00 2001 From: Ruchira Sasanka Date: Mon, 7 Jan 2002 19:17:41 +0000 Subject: [PATCH] MachineRegInfo: Added a method to get the size of a register pushed on to stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1492 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/MachineInstrInfo.h | 1 - include/llvm/Target/TargetInstrInfo.h | 1 - include/llvm/Target/TargetRegInfo.h | 83 +------------------------- 3 files changed, 2 insertions(+), 83 deletions(-) diff --git a/include/llvm/Target/MachineInstrInfo.h b/include/llvm/Target/MachineInstrInfo.h index b03993e6ce2..6b1804fd146 100644 --- a/include/llvm/Target/MachineInstrInfo.h +++ b/include/llvm/Target/MachineInstrInfo.h @@ -185,7 +185,6 @@ public: } - // Check if an instruction can be issued before its operands are ready, // or if a subsequent instruction that uses its result can be issued // before the results are ready. diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index b03993e6ce2..6b1804fd146 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -185,7 +185,6 @@ public: } - // Check if an instruction can be issued before its operands are ready, // or if a subsequent instruction that uses its result can be issued // before the results are ready. diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 4bd2319d02f..052a42cf5a2 100644 --- a/include/llvm/Target/TargetRegInfo.h +++ b/include/llvm/Target/TargetRegInfo.h @@ -133,7 +133,7 @@ public: virtual void colorCallArgs(const MachineInstr *const CalI, LiveRangeInfo& LRI, AddedInstrns *const CallAI, - PhyRegAlloc &PRA) const = 0; + PhyRegAlloc &PRA, const BasicBlock *BB) const = 0; virtual void colorRetValue(const MachineInstr *const RetI,LiveRangeInfo& LRI, AddedInstrns *const RetAI) const = 0; @@ -189,8 +189,7 @@ public: const BasicBlock *BB, PhyRegAlloc &PRA ) const = 0; - - //virtual void printReg(const LiveRange *const LR) const =0; + virtual inline int getSpilledRegSize(const int RegType) const = 0; MachineRegInfo(const TargetMachine& tgt) : target(tgt) { } @@ -203,82 +202,4 @@ public: -#if 0 - -//--------------------------------------------------------------------------- -// class MachineRegInfo -// -// Purpose: -// Interface to register info of target machine -// -//-------------------------------------------------------------------------- - - - -typedef hash_map AddedInstrMapType; - -// A vector of all machine register classes -typedef vector MachineRegClassArrayType; - - -class MachineRegInfo : public NonCopyableV { - -protected: - - MachineRegClassArrayType MachineRegClassArr; - - -public: - - MachineRegInfo() {} - - // According the definition of a MachineOperand class, a Value in a - // machine instruction can go into either a normal register or a - // condition code register. If isCCReg is true below, the ID of the condition - // code regiter class will be returned. Otherwise, the normal register - // class (eg. int, float) must be returned. - virtual unsigned getRegClassIDOfValue (const Value *const Val, - bool isCCReg = false) const =0; - - - // returns the register that is hardwired to zero if any (-1 if none) - virtual inline int getZeroRegNum() const = 0; - - inline unsigned int getNumOfRegClasses() const { - return MachineRegClassArr.size(); - } - - const MachineRegClassInfo *const getMachineRegClass(unsigned i) const { - return MachineRegClassArr[i]; - } - - - - //virtual unsigned getRegClassIDOfValue (const Value *const Val) const = 0; - // this method must give the exact register class of a machine operand - // e.g, Int, Float, Int CC, Float CC - //virtual unsigned getRCIDOfMachineOp (const MachineOperand &MO) const = 0; - - - virtual void colorArgs(const Method *const Meth, - LiveRangeInfo & LRI) const = 0; - - virtual void colorCallArgs(vector & CallInstrList, - LiveRangeInfo& LRI, - AddedInstrMapType& AddedInstrMap ) const = 0 ; - - virtual int getUnifiedRegNum(int RegClassID, int reg) const = 0; - - virtual const string getUnifiedRegName(int UnifiedRegNum) const = 0; - - //virtual void printReg(const LiveRange *const LR) const =0; -}; - - -#endif - - - - -