LLVM API Documentation

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

#include <HexagonFrameLowering.h>

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

Public Member Functions

 HexagonFrameLowering (const HexagonSubtarget &sti)
 
void emitPrologue (MachineFunction &MF) const
 
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
 
virtual bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
 
virtual bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const
 
int getFrameIndexOffset (const MachineFunction &MF, int FI) const
 
bool hasFP (const MachineFunction &MF) const
 
bool hasTailCall (MachineBasicBlock &MBB) 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 hasReservedCallFrame (const MachineFunction &MF) const
 
virtual bool canSimplifyCallFramePseudos (const MachineFunction &MF) const
 
virtual int getFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg) const
 
virtual void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS=NULL) 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 19 of file HexagonFrameLowering.h.

Constructor & Destructor Documentation

llvm::HexagonFrameLowering::HexagonFrameLowering ( const HexagonSubtarget sti)
inlineexplicit

Definition at line 25 of file HexagonFrameLowering.h.

Member Function Documentation

void HexagonFrameLowering::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 329 of file HexagonFrameLowering.cpp.

References llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getOpcode(), I, llvm_unreachable, and llvm::A64CC::MI.

void HexagonFrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const
virtual
void HexagonFrameLowering::emitPrologue ( MachineFunction MF) const
virtual
int HexagonFrameLowering::getFrameIndexOffset ( const MachineFunction MF,
int  FI 
) const
virtual

getFrameIndexOffset - Returns the displacement from the frame register to the stack frame of the specified index.

getFrameIndexOffset - Returns the displacement from the frame register to the stack frame of the specified index. This is the default implementation which is overridden for some targets.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 343 of file HexagonFrameLowering.cpp.

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

bool HexagonFrameLowering::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 203 of file HexagonFrameLowering.cpp.

References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFrameInfo::hasCalls(), and llvm::HexagonMachineFunctionInfo::hasClobberLR().

Referenced by emitEpilogue(), and emitPrologue().

bool HexagonFrameLowering::hasTailCall ( MachineBasicBlock MBB) const
bool HexagonFrameLowering::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 276 of file HexagonFrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::TargetMachine::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getTarget(), llvm::TargetInstrInfo::loadRegFromStackSlot(), TII, and uniqueSuperReg().

bool HexagonFrameLowering::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 222 of file HexagonFrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::TargetMachine::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getTarget(), llvm::TargetInstrInfo::storeRegToStackSlot(), TII, and uniqueSuperReg().


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