40 #define DEBUG_TYPE "mips-reg-info" 57 return &Mips::GPR32RegClass;
60 return &Mips::GPR64RegClass;
106 switch (ConstraintID) {
149 int64_t SPOffset)
const {
165 MinCSFI = CSI[0].getFrameIdx();
166 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
183 FrameReg = ABI.GetStackPtr();
184 else if (RegInfo->needsStackRealignment(MF)) {
186 FrameReg = ABI.GetBasePtr();
190 FrameReg = ABI.GetStackPtr();
204 Offset = SPOffset + (int64_t)StackSize;
214 unsigned OffsetBitSize =
218 if (OffsetBitSize < 16 &&
isInt<16>(Offset) &&
219 (!
isIntN(OffsetBitSize, Offset) ||
226 ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass;
232 BuildMI(MBB, II, DL, TII.get(ABI.GetPtrAddiuOp()), Reg)
249 OffsetBitSize == 16 ? &NewImm :
nullptr);
250 BuildMI(MBB, II, DL, TII.get(ABI.GetPtrAdduOp()), Reg).
addReg(FrameReg)
254 Offset = SignExtend64<16>(NewImm);
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
This class represents lattice values for constants.
void ChangeToRegister(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isDebug=false)
ChangeToRegister - Replace this operand with a new register operand of the specified value...
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
unsigned getFrameRegister(const MachineFunction &MF) const override
Debug information queries.
constexpr bool isInt< 16 >(int64_t x)
const HexagonInstrInfo * TII
bool inMicroMipsMode() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
INLINEASM - Represents an inline asm block.
virtual const TargetInstrInfo * getInstrInfo() const
bool requiresRegisterScavenging(const MachineFunction &MF) const override
void ChangeToImmediate(int64_t ImmVal)
ChangeToImmediate - Replace this operand with a new immediate operand of the specified value...
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
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.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
static unsigned getMemoryConstraintID(unsigned Flag)
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
bool isIntN(unsigned N, int64_t x)
Checks if an signed integer fits into the given (dynamic) bit width.
bool isDebugValue() const
MachineOperand class - Representation of each machine instruction operand.
const TargetRegisterClass * intRegClass(unsigned Size) const override
Return GPR register class.
CHAIN = SC CHAIN, Imm128 - System call.
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
unsigned loadImmediate(int64_t Imm, MachineBasicBlock &MBB, MachineBasicBlock::iterator II, const DebugLoc &DL, unsigned *NewImm) const
Emit a series of instructions to load an immediate.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align)
Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a mu...
bool isEhDataRegFI(int FI) const
const MachineOperand & getOperand(unsigned i) const
static unsigned getLoadStoreOffsetAlign(const unsigned Opcode)
Get the scale factor applied to the immediate in the given load/store.
unsigned createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
bool isISRRegFI(int FI) const
static unsigned getLoadStoreOffsetSizeInBits(const unsigned Opcode, MachineOperand MO)
Get the size of the offset supported by the given load/store/inline asm.
bool requiresFrameIndexScavenging(const MachineFunction &MF) const override