LLVM API Documentation
#include <HexagonFrameLowering.h>
Public Member Functions | |
HexagonFrameLowering () | |
void | emitPrologue (MachineFunction &MF) const override |
void | emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override |
bool | spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override |
void | eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override |
bool | restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override |
int | getFrameIndexOffset (const MachineFunction &MF, int FI) const override |
bool | hasFP (const MachineFunction &MF) const override |
bool | hasTailCall (MachineBasicBlock &MBB) const |
Definition at line 18 of file HexagonFrameLowering.h.
llvm::HexagonFrameLowering::HexagonFrameLowering | ( | ) | [inline, explicit] |
Definition at line 23 of file HexagonFrameLowering.h.
void HexagonFrameLowering::eliminateCallFramePseudoInstr | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | MI | ||
) | const [override, virtual] |
eliminateCallFramePseudoInstr - This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy pseudo instructions (but only if the Target is using them). It is responsible for eliminating these instructions, replacing them with concrete instructions. This method need only be implemented if using call frame setup/destroy pseudo instructions.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 332 of file HexagonFrameLowering.cpp.
References llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getOpcode(), I, llvm_unreachable, and llvm::AArch64CC::MI.
void HexagonFrameLowering::emitEpilogue | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB | ||
) | const [override, virtual] |
Implements llvm::TargetFrameLowering.
Definition at line 148 of file HexagonFrameLowering.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineInstr::copyImplicitOps(), DisableDeallocRet, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), llvm::MCInstrInfo::get(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetMachine::getOptLevel(), llvm::MachineBasicBlock::getParent(), llvm::TargetMachine::getSubtarget(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), hasFP(), I, llvm::None, and TII.
void HexagonFrameLowering::emitPrologue | ( | MachineFunction & | MF | ) | const [override, virtual] |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Implements llvm::TargetFrameLowering.
Definition at line 79 of file HexagonFrameLowering.cpp.
References llvm::HexagonISD::ADJDYNALLOC, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::HexagonISD::CONST32_Int_Real, llvm::MachineBasicBlock::end(), llvm::MachineFunction::front(), llvm::MCInstrInfo::get(), llvm::HexagonMachineFunctionInfo::getAllocaAdjustInsts(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::HexagonRegisterInfo::getStackRegister(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), hasFP(), HEXAGON_RESERVED_REG_1, llvm::MachineOperand::isImm(), llvm::AArch64CC::MI, llvm::MachineOperand::setImm(), and TII.
int HexagonFrameLowering::getFrameIndexOffset | ( | const MachineFunction & | MF, |
int | FI | ||
) | const [override, virtual] |
getFrameIndexOffset - Returns the displacement from the frame register to the stack frame of the specified index.
getFrameIndexOffset - Returns the displacement from the frame register to the stack frame of the specified index. This is the default implementation which is overridden for some targets.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 346 of file HexagonFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), and llvm::MachineFrameInfo::getObjectOffset().
bool HexagonFrameLowering::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 206 of file HexagonFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFrameInfo::hasCalls(), and llvm::HexagonMachineFunctionInfo::hasClobberLR().
Referenced by emitEpilogue(), and emitPrologue().
bool HexagonFrameLowering::hasTailCall | ( | MachineBasicBlock & | MBB | ) | const |
Definition at line 141 of file HexagonFrameLowering.cpp.
References llvm::MachineBasicBlock::getLastNonDebugInstr().
bool HexagonFrameLowering::restoreCalleeSavedRegisters | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override, virtual] |
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of load instructions via loadRegToStackSlot(). Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 279 of file HexagonFrameLowering.cpp.
References llvm::MachineBasicBlock::addLiveIn(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getSubtarget(), llvm::TargetInstrInfo::loadRegFromStackSlot(), TII, and uniqueSuperReg().
bool HexagonFrameLowering::spillCalleeSavedRegisters | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override, virtual] |
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of store instructions via storeRegToStackSlot(). Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 225 of file HexagonFrameLowering.cpp.
References llvm::MachineBasicBlock::addLiveIn(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getSubtarget(), llvm::TargetInstrInfo::storeRegToStackSlot(), TII, and uniqueSuperReg().