LLVM API Documentation

Public Member Functions
llvm::AArch64FrameLowering Class Reference

#include <AArch64FrameLowering.h>

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

List of all members.

Public Member Functions

 AArch64FrameLowering ()
void emitCalleeSavedFrameMoves (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned FramePtr) const
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
void emitPrologue (MachineFunction &MF) const override
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override
int getFrameIndexOffset (const MachineFunction &MF, int FI) const override
int getFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg) const override
int resolveFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg, bool PreferFP=false) const
bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
bool canUseRedZone (const MachineFunction &MF) const
 Can this function use the red zone for local allocations.
bool hasFP (const MachineFunction &MF) const override
bool hasReservedCallFrame (const MachineFunction &MF) const override
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) const override

Detailed Description

Definition at line 21 of file AArch64FrameLowering.h.


Constructor & Destructor Documentation

Definition at line 23 of file AArch64FrameLowering.h.


Member Function Documentation

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 108 of file AArch64FrameLowering.cpp.

References Align(), llvm::emitFrameOffset(), llvm::MachineBasicBlock::erase(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), llvm::TargetFrameLowering::hasReservedCallFrame(), llvm::RoundUpToAlignment(), and TII.

void AArch64FrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const [override, virtual]
void AArch64FrameLowering::emitPrologue ( MachineFunction MF) const [override, virtual]
int AArch64FrameLowering::getFrameIndexOffset ( const MachineFunction MF,
int  FI 
) const [override, virtual]

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

Reimplemented from llvm::TargetFrameLowering.

Definition at line 530 of file AArch64FrameLowering.cpp.

References getFrameIndexReference().

int AArch64FrameLowering::getFrameIndexReference ( const MachineFunction MF,
int  FI,
unsigned FrameReg 
) const [override, virtual]

getFrameIndexReference - Provide a base+offset reference to an FI slot for debug info. It's the same as what we use for resolving the code-gen references for now. FIXME: This can go wrong when references are SP-relative and simple call frames aren't used.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 540 of file AArch64FrameLowering.cpp.

References resolveFrameIndexReference().

Referenced by getFrameIndexOffset().

bool AArch64FrameLowering::hasFP ( const MachineFunction MF) const [override, 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 104 of file AArch64FrameLowering.cpp.

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

int AArch64FrameLowering::resolveFrameIndexReference ( const MachineFunction MF,
int  FI,
unsigned FrameReg,
bool  PreferFP = false 
) const

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 691 of file AArch64FrameLowering.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::dbgs(), DEBUG, llvm::RegState::Define, llvm::MachineBasicBlock::end(), llvm::MCInstrInfo::get(), llvm::getDefRegState(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MCRegisterInfo::getName(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), llvm_unreachable, and TII.

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 615 of file AArch64FrameLowering.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::dbgs(), DEBUG, llvm::RegState::Define, llvm::MachineBasicBlock::end(), llvm::MachineInstr::FrameSetup, llvm::MCInstrInfo::get(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MCRegisterInfo::getName(), llvm::MachineBasicBlock::getParent(), getPrologueDeath(), llvm::MachineFunction::getSubtarget(), llvm_unreachable, llvm::MachineInstrBuilder::setMIFlag(), and TII.


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