LLVM API Documentation

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

#include <SparcFrameLowering.h>

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

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
 
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS=NULL) 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 bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
virtual bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
virtual bool canSimplifyCallFramePseudos (const MachineFunction &MF) const
 
virtual int getFrameIndexOffset (const MachineFunction &MF, int FI) const
 
virtual int getFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg) const
 
virtual void processFunctionBeforeFrameFinalized (MachineFunction &MF, RegScavenger *RS=NULL) const
 

Additional Inherited Members

- Public Types inherited from llvm::TargetFrameLowering
enum  StackDirection { StackGrowsUp, StackGrowsDown }
 

Detailed Description

Definition at line 24 of file SparcFrameLowering.h.

Constructor & Destructor Documentation

llvm::SparcFrameLowering::SparcFrameLowering ( const SparcSubtarget ST)
inlineexplicit

Definition at line 27 of file SparcFrameLowering.h.

Member Function Documentation

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 95 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(), I, llvm::A64CC::MI, and TII.

void SparcFrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const
virtual
void SparcFrameLowering::emitPrologue ( MachineFunction MF) const
virtual
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 159 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 151 of file SparcFrameLowering.cpp.

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

Referenced by eliminateCallFramePseudoInstr().

void SparcFrameLowering::processFunctionBeforeCalleeSavedScan ( MachineFunction MF,
RegScavenger RS = NULL 
) const
virtual

processFunctionBeforeCalleeSavedScan - This method is called immediately before PrologEpilogInserter scans the physical registers used to determine what callee saved registers should be spilled. This method is optional.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 228 of file SparcFrameLowering.cpp.

References DisableLeafProc, llvm::MachineFunction::getInfo(), and llvm::SparcMachineFunctionInfo::setLeafProc().


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