25#define DEBUG_TYPE "xtensa-reg-info"
27#define GET_REGINFO_TARGET_DESC
28#include "XtensaGenRegisterInfo.inc"
37 return Subtarget.isWindowedABI() ? CSRW8_Xtensa_SaveList
38 : CSR_Xtensa_SaveList;
44 return Subtarget.isWindowedABI() ? CSRW8_Xtensa_RegMask : CSR_Xtensa_RegMask;
66 int SPAdj,
unsigned FIOperandNum,
70 int FrameIndex =
MI.getOperand(FIOperandNum).getIndex();
79 MinCSFI = CSI[0].getFrameIdx();
80 MaxCSFI = CSI[CSI.size() - 1].getFrameIdx();
90 if ((FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI))
91 FrameReg = Xtensa::SP;
104 SPOffset + (int64_t)StackSize +
MI.getOperand(FIOperandNum + 1).getImm();
110 if (!
MI.isDebugValue() && !Valid) {
113 unsigned ADD = Xtensa::ADD;
116 MBB.getParent()->getSubtarget().getInstrInfo());
128 MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg,
false,
false, IsKill);
129 MI.getOperand(FIOperandNum + 1).ChangeToImmediate(
Offset);
136 return TFI->
hasFP(MF) ? (
Subtarget.isWindowedABI() ? Xtensa::A7 : Xtensa::A15)
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const HexagonInstrInfo * TII
uint64_t IntrinsicInst * II
Wrapper class representing physical registers. Should be passed by value.
MachineInstrBundleIterator< MachineInstr > iterator
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
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 XtensaSubtarget & Subtarget
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
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
@ Kill
The last use of a register.
bool isValidAddrOffsetForOpcode(unsigned Opcode, int64_t Offset)
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.