LLVM API Documentation
#include <SparcFrameLowering.h>


Public Member Functions | |
| SparcFrameLowering (const SparcSubtarget &ST) | |
| void | emitPrologue (MachineFunction &MF) const |
| void | emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const |
| void | eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const |
| bool | hasReservedCallFrame (const MachineFunction &MF) const |
| bool | hasFP (const MachineFunction &MF) const |
Definition at line 24 of file SparcFrameLowering.h.
| llvm::SparcFrameLowering::SparcFrameLowering | ( | const SparcSubtarget & | ST | ) | [inline, explicit] |
Definition at line 27 of file SparcFrameLowering.h.
| void SparcFrameLowering::eliminateCallFramePseudoInstr | ( | MachineFunction & | MF, |
| MachineBasicBlock & | MBB, | ||
| MachineBasicBlock::iterator | MI | ||
| ) | const [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 80 of file SparcFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::TargetMachine::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getTarget(), hasReservedCallFrame(), llvm::ARM_PROC::I, llvm::A64CC::MI, and TII.
| void SparcFrameLowering::emitEpilogue | ( | MachineFunction & | MF, |
| MachineBasicBlock & | MBB | ||
| ) | const [virtual] |
Implements llvm::TargetFrameLowering.
Definition at line 98 of file SparcFrameLowering.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::TargetMachine::getInstrInfo(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::MachineFunction::getTarget(), and TII.
| void SparcFrameLowering::emitPrologue | ( | MachineFunction & | MF | ) | const [virtual] |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Implements llvm::TargetFrameLowering.
Definition at line 29 of file SparcFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::front(), llvm::MachineFunction::getFrameInfo(), llvm::TargetMachine::getInstrInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::SparcSubtarget::is64Bit(), llvm::RoundUpToAlignment(), and TII.
| bool SparcFrameLowering::hasFP | ( | const MachineFunction & | MF | ) | const [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 118 of file SparcFrameLowering.cpp.
References llvm::TargetOptions::DisableFramePointerElim(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::MachineFrameInfo::isFrameAddressTaken(), and llvm::TargetMachine::Options.
| bool SparcFrameLowering::hasReservedCallFrame | ( | const MachineFunction & | MF | ) | const [virtual] |
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required, we reserve argument space for call sites in the function immediately on entry to the current function. This eliminates the need for add/sub sp brackets around call sites. Returns true if the call frame is included as part of the stack frame.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 110 of file SparcFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), and llvm::MachineFrameInfo::hasVarSizedObjects().
Referenced by eliminateCallFramePseudoInstr().