38#define DEBUG_TYPE "mips16-registerinfo"
70 return &Mips::CPU16RegsRegClass;
74 unsigned OpNo,
int FrameIndex,
76 int64_t SPOffset)
const {
86 MinCSFI = CSI[0].getFrameIdx();
87 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
99 if (FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI)
103 if (TFI->
hasFP(MF)) {
107 if ((
MI.getNumOperands()> OpNo+2) &&
MI.getOperand(OpNo+2).isReg())
108 FrameReg =
MI.getOperand(OpNo+2).getReg();
124 Offset = SPOffset + (int64_t)StackSize;
125 Offset +=
MI.getOperand(OpNo + 1).getImm();
130 if (!
MI.isDebugValue() &&
138 Offset = SignExtend64<16>(NewImm);
141 MI.getOperand(OpNo).ChangeToRegister(FrameReg,
false,
false, IsKill);
142 MI.getOperand(OpNo + 1).ChangeToImmediate(
Offset);
MachineInstrBuilder & UseMI
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file contains the declarations for the subclasses of Constant, which represent the different fla...
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) 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.
virtual bool hasFP(const MachineFunction &MF) const =0
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.