diff options
author | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2002-01-07 19:17:41 +0000 |
---|---|---|
committer | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2002-01-07 19:17:41 +0000 |
commit | c1a29f10a6f0bc3d219db9594ed8d3ec20efd8a4 (patch) | |
tree | c75d615c66f153823305fbed77ea039e7d10c646 | |
parent | 42bd177eae30b6bdef578b6efb21e6c609aa5204 (diff) |
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
-rw-r--r-- | include/llvm/Target/MachineInstrInfo.h | 1 | ||||
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 1 | ||||
-rw-r--r-- | 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 b03993e6ce..6b1804fd14 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 b03993e6ce..6b1804fd14 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 4bd2319d02..052a42cf5a 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<const MachineInstr *, AddedInstrns *> AddedInstrMapType; - -// A vector of all machine register classes -typedef vector<const MachineRegClassInfo *> 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<const Instruction *> & 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 - - - - - |