LLVM API Documentation

Public Member Functions
llvm::Thumb1FrameLowering Class Reference

#include <Thumb1FrameLowering.h>

Inheritance diagram for llvm::Thumb1FrameLowering:
Inheritance graph
[legend]
Collaboration diagram for llvm::Thumb1FrameLowering:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Thumb1FrameLowering (const ARMSubtarget &sti)
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
bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
bool hasReservedCallFrame (const MachineFunction &MF) const override
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override

Detailed Description

Definition at line 24 of file Thumb1FrameLowering.h.


Constructor & Destructor Documentation

Definition at line 24 of file Thumb1FrameLowering.cpp.


Member Function Documentation

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::ARMFrameLowering.

Definition at line 52 of file Thumb1FrameLowering.cpp.

References Align(), emitSPUpdate(), llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), hasReservedCallFrame(), I, and TII.

void Thumb1FrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const [override, virtual]

Reimplemented from llvm::ARMFrameLowering.

Definition at line 318 of file Thumb1FrameLowering.cpp.

References llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addReg(), Align(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineInstrBuilder::copyImplicitOps(), llvm::RegState::Define, emitSPUpdate(), llvm::emitThumbRegPlusImmediate(), llvm::MachineBasicBlock::erase(), FramePtr, llvm::MachineBasicBlock::front(), llvm::ARMFunctionInfo::getArgRegsSaveSize(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::ARMFunctionInfo::getDPRCalleeSavedAreaSize(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::ARMFunctionInfo::getFramePtrSpillOffset(), llvm::ARMFunctionInfo::getGPRCalleeSavedArea1Size(), llvm::ARMFunctionInfo::getGPRCalleeSavedArea2Size(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::MachineInstr::getOpcode(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::ARMFunctionInfo::getReturnRegsCount(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineFunction::getTarget(), llvm::ARMFunctionInfo::hasStackFrame(), llvm::ARMSubtarget::hasV4TOps(), llvm::ARMSubtarget::hasV5TOps(), isCSRestore(), llvm::MachineRegisterInfo::isPhysRegUsed(), llvm::RegState::Kill, llvm::ARMFunctionInfo::shouldRestoreSPFromFP(), llvm::ARMFrameLowering::STI, TII, and llvm::tryFoldSPUpdateIntoPushPop().

void Thumb1FrameLowering::emitPrologue ( MachineFunction MF) const [override, virtual]

emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.

Reimplemented from llvm::ARMFrameLowering.

Definition at line 85 of file Thumb1FrameLowering.cpp.

References llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addImm(), Align(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::TargetOpcode::CFI_INSTRUCTION, llvm::MCCFIInstruction::createDefCfa(), llvm::MCCFIInstruction::createDefCfaOffset(), llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCCFIInstruction::createOffset(), emitSPUpdate(), llvm::MachineBasicBlock::end(), FramePtr, llvm::MachineInstr::FrameSetup, llvm::MachineFunction::front(), llvm::ARMFunctionInfo::getArgRegsSaveSize(), llvm::ARMBaseRegisterInfo::getBaseRegister(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MCRegisterInfo::getDwarfRegNum(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::ARMFunctionInfo::getFramePtrSpillOffset(), llvm::ARMBaseRegisterInfo::getFrameRegister(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getMMI(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getOffsetAdjustment(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineFunction::getTarget(), llvm::ARMBaseRegisterInfo::hasBasePointer(), llvm::ARMFrameLowering::hasFP(), llvm::ARMFunctionInfo::hasStackFrame(), llvm::MachineFrameInfo::hasVarSizedObjects(), I, llvm::ARMSubtarget::isTargetELF(), llvm::ARMSubtarget::isTargetMachO(), llvm::ARMBaseRegisterInfo::needsStackRealignment(), llvm::report_fatal_error(), llvm::ARMFunctionInfo::setDPRCalleeSavedAreaOffset(), llvm::ARMFunctionInfo::setDPRCalleeSavedAreaSize(), llvm::ARMFunctionInfo::setFramePtrSpillOffset(), llvm::ARMFunctionInfo::setGPRCalleeSavedArea1Offset(), llvm::ARMFunctionInfo::setGPRCalleeSavedArea1Size(), llvm::ARMFunctionInfo::setGPRCalleeSavedArea2Offset(), llvm::ARMFunctionInfo::setGPRCalleeSavedArea2Size(), llvm::MachineInstrBuilder::setMIFlags(), llvm::MachineFrameInfo::setOffsetAdjustment(), llvm::ARMFunctionInfo::setShouldRestoreSPFromFP(), llvm::MachineFrameInfo::setStackSize(), llvm::ARMFrameLowering::STI, TII, and llvm::tryFoldSPUpdateIntoPushPop().

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::ARMFrameLowering.

Definition at line 27 of file Thumb1FrameLowering.cpp.

References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMaxCallFrameSize(), and llvm::MachineFrameInfo::hasVarSizedObjects().

Referenced by eliminateCallFramePseudoInstr().


The documentation for this class was generated from the following files: