LLVM API Documentation

Public Member Functions
llvm::SystemZFrameLowering Class Reference

#include <SystemZFrameLowering.h>

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

List of all members.

Public Member Functions

 SystemZFrameLowering ()
bool isFPCloseToIncomingSP () const override
const SpillSlotgetCalleeSavedSpillSlots (unsigned &NumEntries) const override
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) const override
bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBII, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
void processFunctionBeforeFrameFinalized (MachineFunction &MF, RegScavenger *RS) const override
void emitPrologue (MachineFunction &MF) const override
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override
bool hasFP (const MachineFunction &MF) const override
int getFrameIndexOffset (const MachineFunction &MF, int FI) const override
bool hasReservedCallFrame (const MachineFunction &MF) const override
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
uint64_t getAllocatedStackSize (const MachineFunction &MF) const
unsigned getRegSpillOffset (unsigned Reg) const

Detailed Description

Definition at line 20 of file SystemZFrameLowering.h.


Constructor & Destructor Documentation


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 501 of file SystemZFrameLowering.cpp.

References llvm::MachineBasicBlock::erase(), hasReservedCallFrame(), and llvm_unreachable.

void SystemZFrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const [override, virtual]
void SystemZFrameLowering::emitPrologue ( MachineFunction MF) const [override, virtual]

getCalleeSavedSpillSlots - This method returns a pointer to an array of pairs, that contains an entry for each callee saved register that must be spilled to a particular stack location if it is spilled.

Each entry in this array contains a <register,offset> pair, indicating the fixed offset from the incoming stack pointer that each register should be spilled at. If a register is not listed here, the code generator is allowed to spill it anywhere it chooses.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 59 of file SystemZFrameLowering.cpp.

References llvm::array_lengthof().

int SystemZFrameLowering::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.

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 456 of file SystemZFrameLowering.cpp.

References getAllocatedStackSize(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getOffsetAdjustment(), and llvm::TargetFrameLowering::getOffsetOfLocalArea().

Referenced by emitPrologue().

Definition at line 58 of file SystemZFrameLowering.h.

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

References llvm::TargetOptions::DisableFramePointerElim(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasVarSizedObjects(), and llvm::TargetMachine::Options.

Referenced by emitPrologue(), processFunctionBeforeCalleeSavedScan(), and restoreCalleeSavedRegisters().

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 492 of file SystemZFrameLowering.cpp.

Referenced by eliminateCallFramePseudoInstr().

bool llvm::SystemZFrameLowering::isFPCloseToIncomingSP ( ) const [inline, override, virtual]

isFPCloseToIncomingSP - Return true if the frame pointer is close to the incoming stack pointer, false if it is close to the post-prologue stack pointer.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 27 of file SystemZFrameLowering.h.

void SystemZFrameLowering::processFunctionBeforeFrameFinalized ( MachineFunction MF,
RegScavenger RS 
) const [override, virtual]

processFunctionBeforeFrameFinalized - This method is called immediately before the specified function's frame layout (MF.getFrameInfo()) is finalized. Once the frame is finalized, MO_FrameIndex operands are replaced with direct constants. This method is optional.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 268 of file SystemZFrameLowering.cpp.

References llvm::RegScavenger::addScavengingFrameIndex(), llvm::SystemZMC::CallFrameSize, llvm::MachineFrameInfo::CreateStackObject(), llvm::MachineFrameInfo::estimateStackSize(), and llvm::MachineFunction::getFrameInfo().


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