Go to the documentation of this file.
25 #define GET_REGINFO_TARGET_DESC
26 #include "BPFGenRegisterInfo.inc"
39 markSuperRegs(Reserved, BPF::W10);
40 markSuperRegs(Reserved, BPF::W11);
49 "Looks like the BPF stack limit of 512 bytes is exceeded. "
50 "Please move large on stack variables into BPF per-cpu array map.\n",
52 F.getContext().diagnose(DiagStackSize);
57 int SPAdj,
unsigned FIOperandNum,
59 assert(SPAdj == 0 &&
"Unexpected");
70 if (
I.getDebugLoc()) {
75 while (!
MI.getOperand(
i).isFI()) {
77 assert(
i <
MI.getNumOperands() &&
"Instr doesn't have FrameIndex operand!");
84 if (
MI.getOpcode() == BPF::MOV_rr) {
88 MI.getOperand(
i).ChangeToRegister(FrameReg,
false);
97 MI.getOperand(
i + 1).getImm();
104 if (
MI.getOpcode() == BPF::FI_ri) {
117 MI.eraseFromParent();
119 MI.getOperand(
i).ChangeToRegister(FrameReg,
false);
120 MI.getOperand(
i + 1).ChangeToImmediate(Offset);
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
This is an optimization pass for GlobalISel generic memory operations.
Diagnostic information for unsupported feature in backend.
virtual const TargetInstrInfo * getInstrInfo() const
TargetInstrInfo - Interface to description of machine instruction set.
const HexagonInstrInfo * TII
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
Register getFrameRegister(const MachineFunction &MF) const override
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
constexpr bool isInt< 32 >(int64_t x)
Representation of each machine instruction.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
BitVector getReservedRegs(const MachineFunction &MF) const override
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Wrapper class representing virtual and physical registers.
Function & getFunction()
Return the LLVM function that this machine code represents.
static void WarnSize(int Offset, MachineFunction &MF, DebugLoc &DL)
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.