23 cl::desc(
"Always use $gp as the global base register."));
35 if (STI.inMips16Mode())
36 return Mips::CPU16RegsRegClass;
38 if (STI.inMicroMipsMode())
39 return Mips::GPRMM16RegClass;
41 if (
TM.getABI().IsN64())
42 return Mips::GPR64RegClass;
44 return Mips::GPR32RegClass;
75 RC = (ABI.
IsN64()) ? &Mips::GPR64RegClass : &Mips::GPR32RegClass;
90 BuildMI(MBB, I, DL, TII.
get(Mips::DADDu), V1).addReg(V0)
92 BuildMI(MBB, I, DL, TII.
get(Mips::DADDiu), GlobalBaseReg).addReg(V1)
104 BuildMI(MBB, I, DL, TII.
get(Mips::ADDiu), GlobalBaseReg).addReg(V0)
120 BuildMI(MBB, I, DL, TII.
get(Mips::ADDiu), GlobalBaseReg).addReg(V1)
146 BuildMI(MBB, I, DL, TII.
get(Mips::ADDu), GlobalBaseReg)
147 .addReg(Mips::V0).
addReg(Mips::T9);
152 for (
int I = 0;
I < 4; ++
I) {
155 ? Mips::GPR64RegClass
156 : Mips::GPR32RegClass;
171 for (
int I = 0;
I < 2; ++
I)
177 return CallsEhReturn && (FI == EhDataRegFI[0] || FI == EhDataRegFI[1]
178 || FI == EhDataRegFI[2] || FI == EhDataRegFI[3]);
182 return IsISR && (FI == ISRDataRegFI[0] || FI == ISRDataRegFI[1]);
194 if (MoveF64ViaSpillFI == -1) {
198 return MoveF64ViaSpillFI;
201 void MipsFunctionInfo::anchor() {}
This class represents lattice values for constants.
Register createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
void addLiveIn(unsigned Reg, unsigned vreg=0)
addLiveIn - Add the specified register as a live-in.
unsigned const TargetRegisterInfo * TRI
unsigned getSpillSize(const TargetRegisterClass &RC) const
Return the size in bytes of the stack slot allocated to hold a spilled copy of a register from class ...
unsigned getSpillAlignment(const TargetRegisterClass &RC) const
Return the minimum required alignment in bytes for a spill slot for a register of this class...
MachinePointerInfo callPtrInfo(const char *ES)
Create a MachinePointerInfo that has an ExternalSymbolPseudoSourceValue object representing a GOT ent...
const HexagonInstrInfo * TII
bool globalBaseRegSet() const
void createEhDataRegsFI()
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
PseudoSourceValueManager & getPSVManager() const
const MachineInstrBuilder & addGlobalAddress(const GlobalValue *GV, int64_t Offset=0, unsigned TargetFlags=0) const
virtual const TargetInstrInfo * getInstrInfo() const
TargetInstrInfo - Interface to description of machine instruction set.
void addLiveIn(MCRegister PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
static const TargetRegisterClass & getGlobalBaseRegClass(MachineFunction &MF)
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
initializer< Ty > init(const Ty &Val)
const PseudoSourceValue * getExternalSymbolCallEntry(const char *ES)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
Register getGlobalBaseRegForGlobalISel()
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const MachineBasicBlock & front() const
This class contains a discriminated union of information about pointers in memory operands...
Register getGlobalBaseReg()
const Function & getFunction() const
Return the LLVM function that this machine code represents.
const PseudoSourceValue * getGlobalValueCallEntry(const GlobalValue *GV)
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
bool isPositionIndependent() const
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
int getMoveF64ViaSpillFI(const TargetRegisterClass *RC)
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
int CreateStackObject(uint64_t Size, Align Alignment, bool isSpillSlot, const AllocaInst *Alloca=nullptr, uint8_t ID=0)
Create a new statically sized stack object, returning a nonnegative identifier to represent it...
static cl::opt< bool > FixGlobalBaseReg("mips-fix-global-base-reg", cl::Hidden, cl::init(true), cl::desc("Always use $gp as the global base register."))
bool isEhDataRegFI(int FI) const
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
const MachineInstrBuilder & addExternalSymbol(const char *FnName, unsigned TargetFlags=0) const
Wrapper class representing virtual and physical registers.
bool isISRRegFI(int FI) const
~MipsFunctionInfo() override