29#define DEBUG_TYPE "mips16-registerinfo"
54 TII.copyPhysReg(
MBB,
I,
DL, Mips::T0, Reg,
true);
62 return &Mips::CPU16RegsRegClass;
66 unsigned OpNo,
int FrameIndex,
68 int64_t SPOffset)
const {
78 MinCSFI = CSI[0].getFrameIdx();
79 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
91 if (FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI)
99 if ((
MI.getNumOperands()> OpNo+2) &&
MI.getOperand(OpNo+2).isReg())
100 FrameReg =
MI.getOperand(OpNo+2).getReg();
116 Offset = SPOffset + (int64_t)StackSize;
117 Offset +=
MI.getOperand(OpNo + 1).getImm();
122 if (!
MI.isDebugValue() &&
124 MachineBasicBlock &
MBB = *
MI.getParent();
127 const Mips16InstrInfo &
TII =
128 *
static_cast<const Mips16InstrInfo *
>(MF.
getSubtarget().getInstrInfo());
133 MI.getOperand(OpNo).ChangeToRegister(FrameReg,
false,
false, IsKill);
134 MI.getOperand(OpNo + 1).ChangeToImmediate(
Offset);
MachineInstrBuilder & UseMI
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const HexagonInstrInfo * TII
uint64_t IntrinsicInst * II
MachineInstrBundleIterator< MachineInstr > iterator
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)
Mips16RegisterInfo(const MipsSubtarget &STI)
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
MipsRegisterInfo(const MipsSubtarget &STI)
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
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
constexpr int64_t SignExtend64(uint64_t x)
Sign-extend the number in the bottom B bits of X to a 64-bit integer.