LLVM API Documentation
Information about the stack frame layout on the AMDGPU targets. More...
#include <AMDGPUFrameLowering.h>
Public Member Functions | |
AMDGPUFrameLowering (StackDirection D, unsigned StackAl, int LAO, unsigned TransAl=1) | |
virtual | ~AMDGPUFrameLowering () |
unsigned | getStackWidth (const MachineFunction &MF) const |
int | getFrameIndexOffset (const MachineFunction &MF, int FI) const override |
const SpillSlot * | getCalleeSavedSpillSlots (unsigned &NumEntries) const override |
void | emitPrologue (MachineFunction &MF) const override |
void | emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override |
bool | hasFP (const MachineFunction &MF) const override |
Information about the stack frame layout on the AMDGPU targets.
It holds the direction of the stack growth, the known stack alignment on entry to each function, and the offset to the locals area. See TargetFrameInfo for more comments.
Definition at line 28 of file AMDGPUFrameLowering.h.
AMDGPUFrameLowering::AMDGPUFrameLowering | ( | StackDirection | D, |
unsigned | StackAl, | ||
int | LAO, | ||
unsigned | TransAl = 1 |
||
) |
Definition at line 21 of file AMDGPUFrameLowering.cpp.
AMDGPUFrameLowering::~AMDGPUFrameLowering | ( | ) | [virtual] |
Definition at line 25 of file AMDGPUFrameLowering.cpp.
void AMDGPUFrameLowering::emitEpilogue | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB | ||
) | const [override, virtual] |
Implements llvm::TargetFrameLowering.
Definition at line 106 of file AMDGPUFrameLowering.cpp.
void AMDGPUFrameLowering::emitPrologue | ( | MachineFunction & | MF | ) | const [override, virtual] |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Implements llvm::TargetFrameLowering.
Definition at line 103 of file AMDGPUFrameLowering.cpp.
const TargetFrameLowering::SpillSlot * AMDGPUFrameLowering::getCalleeSavedSpillSlots | ( | unsigned & | NumEntries | ) | const [override, virtual] |
getCalleeSavedSpillSlots - This method returns a pointer to an array of pairs, that contains an entry for each callee saved register that must be spilled to a particular stack location if it is spilled.
Each entry in this array contains a <register,offset> pair, indicating the fixed offset from the incoming stack pointer that each register should be spilled at. If a register is not listed here, the code generator is allowed to spill it anywhere it chooses.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 98 of file AMDGPUFrameLowering.cpp.
int AMDGPUFrameLowering::getFrameIndexOffset | ( | const MachineFunction & | MF, |
int | FI | ||
) | const [override, virtual] |
FI
. Reimplemented from llvm::TargetFrameLowering.
Definition at line 74 of file AMDGPUFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getNumObjects(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectSize(), getStackWidth(), and llvm::RoundUpToAlignment().
unsigned AMDGPUFrameLowering::getStackWidth | ( | const MachineFunction & | MF | ) | const |
Definition at line 27 of file AMDGPUFrameLowering.cpp.
Referenced by getFrameIndexOffset(), and llvm::R600InstrInfo::reserveIndirectRegisters().
bool AMDGPUFrameLowering::hasFP | ( | const MachineFunction & | MF | ) | const [override, virtual] |
hasFP - Return true if the specified function should have a dedicated frame pointer register. For most targets this is true only if the function has variable sized allocas or if frame pointer elimination is disabled.
Implements llvm::TargetFrameLowering.
Definition at line 111 of file AMDGPUFrameLowering.cpp.