29#define DEBUG_TYPE "mips16-registerinfo"
61 return &Mips::CPU16RegsRegClass;
65 unsigned OpNo,
int FrameIndex,
67 int64_t SPOffset)
const {
77 MinCSFI = CSI[0].getFrameIdx();
78 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
90 if (FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI)
98 if ((
MI.getNumOperands()> OpNo+2) &&
MI.getOperand(OpNo+2).isReg())
99 FrameReg =
MI.getOperand(OpNo+2).getReg();
115 Offset = SPOffset + (int64_t)StackSize;
116 Offset +=
MI.getOperand(OpNo + 1).getImm();
121 if (!
MI.isDebugValue() &&
129 Offset = SignExtend64<16>(NewImm);
132 MI.getOperand(OpNo).ChangeToRegister(FrameReg,
false,
false, IsKill);
133 MI.getOperand(OpNo + 1).ChangeToImmediate(
Offset);
MachineInstrBuilder & UseMI
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const HexagonInstrInfo * TII
uint64_t IntrinsicInst * II
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
Emit instructions to copy a pair of physical registers.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
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.
Representation of each machine instruction.
static bool validImmediate(unsigned Opcode, unsigned Reg, int64_t Amount)
bool requiresFrameIndexScavenging(const MachineFunction &MF) const override
bool useFPForScavengingIndex(const MachineFunction &MF) const override
bool saveScavengerRegister(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, MachineBasicBlock::iterator &UseMI, const TargetRegisterClass *RC, Register Reg) const override
const TargetRegisterClass * intRegClass(unsigned Size) const override
Return GPR register class.
bool requiresRegisterScavenging(const MachineFunction &MF) const override
Wrapper class representing virtual and physical registers.
Information about stack frame layout on the target.
bool hasFP(const MachineFunction &MF) const
hasFP - Return true if the specified function should have a dedicated frame pointer register.
TargetInstrInfo - Interface to description of machine instruction set.
virtual const TargetFrameLowering * getFrameLowering() const
virtual const TargetInstrInfo * getInstrInfo() const
This is an optimization pass for GlobalISel generic memory operations.
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.