25#define DEBUG_TYPE "xtensa-reg-info"
27#define GET_REGINFO_TARGET_DESC
28#include "XtensaGenRegisterInfo.inc"
37 return CSR_Xtensa_SaveList;
43 return CSR_Xtensa_RegMask;
62 int SPAdj,
unsigned FIOperandNum,
66 int FrameIndex =
MI.getOperand(FIOperandNum).getIndex();
75 MinCSFI = CSI[0].getFrameIdx();
76 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
86 if ((FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI))
87 FrameReg = Xtensa::SP;
100 SPOffset + (int64_t)StackSize +
MI.getOperand(FIOperandNum + 1).getImm();
106 if (!
MI.isDebugValue() && !Valid) {
109 unsigned ADD = Xtensa::ADD;
124 MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg,
false,
false, IsKill);
125 MI.getOperand(FIOperandNum + 1).ChangeToImmediate(
Offset);
132 return TFI->
hasFP(MF) ? Xtensa::A15 : Xtensa::SP;
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const HexagonInstrInfo * TII
uint64_t IntrinsicInst * II
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.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
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.
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Representation of each machine instruction.
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.
virtual const TargetFrameLowering * getFrameLowering() const
virtual const TargetInstrInfo * getInstrInfo() const
XtensaRegisterInfo(const XtensaSubtarget &STI)
const uint16_t * getCalleeSavedRegs(const MachineFunction *MF=0) const override
bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
const uint32_t * getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override
Register getFrameRegister(const MachineFunction &MF) const override
BitVector getReservedRegs(const MachineFunction &MF) const override
@ Kill
The last use of a register.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
bool isValidAddrOffset(int Scale, int64_t OffsetVal)