From febfae46a7137d7b4f89a518ea09f94665c247e3 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sun, 19 May 2002 15:42:21 +0000 Subject: [PATCH] Many functions that returned a single MachineInstr now take a vector of MachineInstr* to return multiple ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2650 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetRegInfo.h | 38 +++++++++++++++-------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 75ff72578e9..1067a9a18df 100644 --- a/include/llvm/Target/TargetRegInfo.h +++ b/include/llvm/Target/TargetRegInfo.h @@ -106,6 +106,11 @@ public: // virtual int getZeroRegNum() const = 0; + // Number of registers used for passing int args (usually 6: %o0 - %o5) + // and float args (usually 32: %f0 - %f31) + // + virtual unsigned const GetNumOfIntArgRegs() const = 0; + virtual unsigned const GetNumOfFloatArgRegs() const = 0; // The following methods are used to color special live ranges (e.g. // method args and return values etc.) with specific hardware registers @@ -137,22 +142,20 @@ public: // interface. However, they can be moved to MachineInstrInfo interface if // necessary. // - virtual MachineInstr *cpReg2RegMI(unsigned SrcReg, unsigned DestReg, - int RegType) const = 0; + virtual void cpReg2RegMI(unsigned SrcReg, unsigned DestReg, + int RegType, vector& mvec) const = 0; - virtual MachineInstr *cpReg2MemMI(unsigned SrcReg, unsigned DestPtrReg, - int Offset, int RegType) const = 0; + virtual void cpReg2MemMI(unsigned SrcReg, unsigned DestPtrReg, int Offset, + int RegTypee, vector& mvec) const=0; - virtual MachineInstr *cpMem2RegMI(unsigned SrcPtrReg, int Offset, - unsigned DestReg, int RegType) const = 0; + virtual void cpMem2RegMI(unsigned SrcPtrReg, int Offset, unsigned DestReg, + int RegTypee, vector& mvec) const=0; - virtual MachineInstr *cpValue2Value(Value *Src, Value *Dest) const = 0; + virtual void cpValue2Value(Value *Src, Value *Dest, + vector& mvec) const = 0; virtual bool isRegVolatile(int RegClassID, int Reg) const = 0; - - - - + // Returns the reg used for pushing the address when a method is called. // This can be used for other purposes between calls // @@ -173,16 +176,15 @@ public: virtual const std::string getUnifiedRegName(int UnifiedRegNum) const = 0; - // Gives the type of a register based on the type of the LR + // The following 4 methods are used to find the RegType (see enum above) + // of a LiveRange, Value and using the unified RegClassID // + virtual int getRegType(unsigned regClassID, const Type* type) const = 0; virtual int getRegType(const LiveRange *LR) const = 0; + virtual int getRegType(const Value *Val) const = 0; + virtual int getRegType(int reg) const = 0; - // To obtain the return value and the indirect call address (if any) - // contained in a CALL machine instruction - // - virtual const Value *getCallInstRetVal(const MachineInstr *CallMI) const = 0; - virtual const Value *getCallInstIndirectAddrVal(const MachineInstr *CallMI) const = 0; - + // The following methods are used to get the frame/stack pointers // virtual unsigned getFramePointer() const = 0;