LLVM API Documentation

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

#include <Mips16FrameLowering.h>

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

Public Member Functions

 Mips16FrameLowering (const MipsSubtarget &STI)
 
void emitPrologue (MachineFunction &MF) const
 
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
 
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) 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 processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) const
 
- Public Member Functions inherited from llvm::MipsFrameLowering
 MipsFrameLowering (const MipsSubtarget &sti, unsigned Alignment)
 
bool hasFP (const MachineFunction &MF) 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 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 }
 
- Static Public Member Functions inherited from llvm::MipsFrameLowering
static const MipsFrameLoweringcreate (MipsTargetMachine &TM, const MipsSubtarget &ST)
 
- Protected Member Functions inherited from llvm::MipsFrameLowering
uint64_t estimateStackSize (const MachineFunction &MF) const
 
- Protected Attributes inherited from llvm::MipsFrameLowering
const MipsSubtargetSTI
 

Detailed Description

Definition at line 20 of file Mips16FrameLowering.h.

Constructor & Destructor Documentation

llvm::Mips16FrameLowering::Mips16FrameLowering ( const MipsSubtarget STI)
inlineexplicit

Definition at line 22 of file Mips16FrameLowering.h.

Member Function Documentation

void Mips16FrameLowering::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 143 of file Mips16FrameLowering.cpp.

References llvm::Mips16InstrInfo::adjustStackPtr(), llvm::MachineBasicBlock::erase(), llvm::TargetMachine::getInstrInfo(), llvm::MachineFunction::getTarget(), hasReservedCallFrame(), and TII.

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

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

Referenced by eliminateCallFramePseudoInstr().

void Mips16FrameLowering::processFunctionBeforeCalleeSavedScan ( MachineFunction MF,
RegScavenger RS 
) 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 169 of file Mips16FrameLowering.cpp.

References llvm::MachineFunction::getRegInfo(), and llvm::MachineRegisterInfo::setPhysRegUsed().

bool Mips16FrameLowering::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::TargetFrameLowering.

Definition at line 127 of file Mips16FrameLowering.cpp.

bool Mips16FrameLowering::spillCalleeSavedRegisters ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI,
const TargetRegisterInfo TRI 
) const
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 99 of file Mips16FrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineFunction::begin(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), and llvm::MachineFrameInfo::isReturnAddressTaken().


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