LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::Thumb1FrameLowering Class Reference

#include <Thumb1FrameLowering.h>

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

Public Member Functions

 Thumb1FrameLowering (const ARMSubtarget &sti)
 
void emitPrologue (MachineFunction &MF) const
 
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
 
bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
bool hasReservedCallFrame (const MachineFunction &MF) const
 
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const
 
- Public Member Functions inherited from llvm::ARMFrameLowering
 ARMFrameLowering (const ARMSubtarget &sti)
 
bool hasFP (const MachineFunction &MF) const
 
bool canSimplifyCallFramePseudos (const MachineFunction &MF) const
 
int getFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg) const
 
int ResolveFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg, int SPAdj) const
 
int getFrameIndexOffset (const MachineFunction &MF, int FI) const
 
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) const
 
- Public Member Functions inherited from llvm::TargetFrameLowering
 TargetFrameLowering (StackDirection D, unsigned StackAl, int LAO, unsigned TransAl=1, bool StackReal=true)
 
virtual ~TargetFrameLowering ()
 
StackDirection getStackGrowthDirection () const
 
unsigned getStackAlignment () const
 
unsigned getTransientStackAlignment () const
 
bool isStackRealignable () const
 
int getOffsetOfLocalArea () const
 
virtual bool isFPCloseToIncomingSP () const
 
virtual const SpillSlotgetCalleeSavedSpillSlots (unsigned &NumEntries) const
 
virtual bool targetHandlesStackFrameRounding () const
 
virtual void adjustForSegmentedStacks (MachineFunction &MF) const
 
virtual void adjustForHiPEPrologue (MachineFunction &MF) const
 
virtual void processFunctionBeforeFrameFinalized (MachineFunction &MF, RegScavenger *RS=NULL) const
 

Additional Inherited Members

- Public Types inherited from llvm::TargetFrameLowering
enum  StackDirection { StackGrowsUp, StackGrowsDown }
 
- Protected Attributes inherited from llvm::ARMFrameLowering
const ARMSubtargetSTI
 

Detailed Description

Definition at line 27 of file Thumb1FrameLowering.h.

Constructor & Destructor Documentation

llvm::Thumb1FrameLowering::Thumb1FrameLowering ( const ARMSubtarget sti)
inlineexplicit

Definition at line 29 of file Thumb1FrameLowering.h.

Member Function Documentation

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

Definition at line 48 of file Thumb1FrameLowering.cpp.

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

void Thumb1FrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const
virtual
void Thumb1FrameLowering::emitPrologue ( MachineFunction MF) const
virtual

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

Reimplemented from llvm::ARMFrameLowering.

Definition at line 81 of file Thumb1FrameLowering.cpp.

References llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addImm(), Align(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::emitSPUpdate(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::FrameSetup, llvm::MachineFunction::front(), llvm::ARMFunctionInfo::getArgRegsSaveSize(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), llvm::TargetMachine::getFrameLowering(), llvm::ARMFunctionInfo::getFramePtrSpillOffset(), llvm::MachineFunction::getInfo(), llvm::TargetMachine::getInstrInfo(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getOffsetAdjustment(), llvm::TargetMachine::getRegisterInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::ARMFrameLowering::hasFP(), llvm::ARMFunctionInfo::hasStackFrame(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::ARMSubtarget::isTargetELF(), llvm::ARMSubtarget::isTargetIOS(), llvm::prior(), R4, R6, 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().

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

Definition at line 23 of file Thumb1FrameLowering.cpp.

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

Referenced by eliminateCallFramePseudoInstr().

bool Thumb1FrameLowering::restoreCalleeSavedRegisters ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI,
const TargetRegisterInfo TRI 
) const
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::ARMFrameLowering.

Definition at line 373 of file Thumb1FrameLowering.cpp.

References llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineInstrBuilder::copyImplicitOps(), llvm::MachineFunction::DeleteMachineInstr(), llvm::MachineBasicBlock::erase(), llvm::DebugLoc::get(), llvm::ARMFunctionInfo::getArgRegsSaveSize(), llvm::getDefRegState(), llvm::MachineFunction::getInfo(), llvm::TargetMachine::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getTarget(), llvm::MachineBasicBlock::insert(), and TII.

bool Thumb1FrameLowering::spillCalleeSavedRegisters ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI,
const TargetRegisterInfo TRI 
) const
virtual

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