LLVM API Documentation

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

#include <AArch64FrameLowering.h>

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

Public Member Functions

 AArch64FrameLowering (const AArch64Subtarget &sti)
 
virtual void emitPrologue (MachineFunction &MF) const
 
virtual void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
 
void splitSPAdjustments (uint64_t Total, uint64_t &Initial, uint64_t &Residual) const
 
int64_t resolveFrameIndexReference (MachineFunction &MF, int FrameIndex, unsigned &FrameReg, int SPAdj, bool IsCalleeSaveOp) const
 
virtual void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) 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
 
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const
 
bool determinePrologueDeath (MachineBasicBlock &MBB, unsigned Reg) const
 
void emitFrameMemOps (bool isStore, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI, const LoadStoreMethod PossibleClasses[], unsigned NumClasses) const
 
virtual bool hasFP (const MachineFunction &MF) const
 
virtual bool useFPForAddressing (const MachineFunction &MF) const
 
virtual bool hasReservedCallFrame (const MachineFunction &MF) const
 On AA. More...
 
- 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
 

Protected Attributes

const AArch64SubtargetSTI
 

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file AArch64FrameLowering.h.

Constructor & Destructor Documentation

llvm::AArch64FrameLowering::AArch64FrameLowering ( const AArch64Subtarget sti)
inlineexplicit

Definition at line 43 of file AArch64FrameLowering.h.

Member Function Documentation

bool AArch64FrameLowering::determinePrologueDeath ( MachineBasicBlock MBB,
unsigned  Reg 
) const

If the register is X30 (i.e. LR) and the return address is used in the function then the callee-save store doesn't actually kill the register, otherwise it does.

Definition at line 407 of file AArch64FrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::isLiveIn(), and llvm::MachineFrameInfo::isReturnAddressTaken().

Referenced by emitFrameMemOps().

void AArch64FrameLowering::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 598 of file AArch64FrameLowering.cpp.

References Align(), llvm::emitSPUpdate(), llvm::MachineBasicBlock::erase(), llvm::TargetMachine::getInstrInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getTarget(), hasReservedCallFrame(), llvm::RoundUpToAlignment(), and TII.

void AArch64FrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const
virtual
void AArch64FrameLowering::emitFrameMemOps ( bool  isStore,
MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI,
const TargetRegisterInfo TRI,
const LoadStoreMethod  PossibleClasses[],
unsigned  NumClasses 
) const
void AArch64FrameLowering::emitPrologue ( MachineFunction MF) const
virtual
bool AArch64FrameLowering::hasFP ( const MachineFunction MF) const
virtual
bool AArch64FrameLowering::hasReservedCallFrame ( const MachineFunction MF) const
virtual
void AArch64FrameLowering::processFunctionBeforeCalleeSavedScan ( MachineFunction MF,
RegScavenger RS 
) const
virtual
int64_t AArch64FrameLowering::resolveFrameIndexReference ( MachineFunction MF,
int  FrameIndex,
unsigned FrameReg,
int  SPAdj,
bool  IsCalleeSaveOp 
) const
bool AArch64FrameLowering::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 544 of file AArch64FrameLowering.cpp.

References llvm::array_lengthof(), and emitFrameMemOps().

bool AArch64FrameLowering::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 524 of file AArch64FrameLowering.cpp.

References llvm::array_lengthof(), and emitFrameMemOps().

void AArch64FrameLowering::splitSPAdjustments ( uint64_t  Total,
uint64_t &  Initial,
uint64_t &  Residual 
) const

Decides how much stack adjustment to perform in each phase of the prologue and epilogue.

Definition at line 32 of file AArch64FrameLowering.cpp.

Referenced by emitPrologue().

bool AArch64FrameLowering::useFPForAddressing ( const MachineFunction MF) const
virtual

Member Data Documentation

const AArch64Subtarget& llvm::AArch64FrameLowering::STI
protected

Definition at line 40 of file AArch64FrameLowering.h.


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