Information about stack frame layout on the target.

Synopsis

Declared in <llvm/CodeGen/TargetFrameLowering.h>

class TargetFrameLowering;

Description

It holds the direction of stack growth, the known stack alignment on entry to each function, and the offset to the locals area.

The offset to the local area is the offset from the stack pointer on function entry to the first location where function data (local variables, spill locations) can be stored.

Types

Name

Description

DwarfFrameBase

Frame‐base location used when emitting DWARF unwind / debug info.

SpillSlot

Maps a callee‐saved register to a stack slot with a fixed offset.

Enums

Name

Description

StackDirection

Direction in which the stack grows.

Member Functions

Name

Description

TargetFrameLowering [constructor]

Construct target frame‐lowering information.

~TargetFrameLowering [destructor] [virtual]

Destroy the target frame‐lowering object.

adjustForHiPEPrologue [virtual]

Adjust the prologue to add Erlang Run‐Time System (ERTS) specific code in the assembly prologue to explicitly handle the stack.

adjustForSegmentedStacks [virtual]

Adjust the prologue to have the function use segmented stacks. This works by adding a check even before the "normal" function prologue.

alignSPAdjust

alignSPAdjust ‐ This method aligns the stack adjustment to the correct alignment.

allocateScavengingFrameIndexesNearIncomingSP [virtual]

Control the placement of special register scavenging spill slots when allocating a stack frame.

assignCalleeSavedSpillSlots [virtual]

Allow the target to override callee‐saved spill slot assignment.

canSimplifyCallFramePseudos [virtual]

Return true if call‐frame pseudos can be simplified before FI elimination.

canUseAsEpilogue [virtual]

Check whether MBB can be used as an epilogue for the target.

canUseAsPrologue [virtual]

Check whether MBB can be used as a prologue for the target.

determineCalleeSaves [virtual]

Determine which callee‐saved registers should actually be saved.

determineUncondPrologCalleeSaves

Determine registers that must be saved/restored in the prolog/epilog.

eliminateCallFramePseudoInstr [virtual]

Eliminate call‐frame setup/destroy pseudo instructions.

emitCalleeSavedFrameMovesFullCFA [virtual]

With basic block sections, emit callee saved frame moves for basic blocks that are in a different section.

emitEpilogue [virtual]

Insert epilogue code into the function.

emitPrologue [virtual]

Insert prologue code into the function.

emitRemarks [virtual]

This method is called at the end of prolog/epilog code insertion, so targets can emit remarks based on the final frame layout.

emitZeroCallUsedRegs [virtual]

emitZeroCallUsedRegs ‐ Zeros out call used registers.

enableCFIFixup [virtual]

Returns true if we may need to fix the unwind information for the function.

enableCalleeSaveSkip [virtual]

Returns true if the target can safely skip saving callee‐saved registers for noreturn nounwind functions.

enableFullCFIFixup [virtual]

Return true if unwind info may need to be accurate for every instruction.

enableShrinkWrapping [virtual]

Returns true if the target will correctly handle shrink wrapping.

enableStackSlotScavenging [virtual]

Returns true if the stack slot holes in the fixed and callee‐save stack area should be used when allocating other stack locations to reduce stack size.

getCalleeSavedSpillSlots [virtual]

Return fixed spill slots for callee‐saved registers that need them.

getCalleeSaves [virtual]

Returns the callee‐saved registers as computed by determineCalleeSaves in the BitVector SavedRegs.

getDwarfFrameBase [virtual]

Return the frame base information to be encoded in the DWARF subprogram debug info.

getFrameIndexReference [virtual]

Return the base register and offset used to reference a frame index.

getFrameIndexReferenceFromSP [virtual]

Return the offset from SP at function entry to the given frame index.

getFrameIndexReferencePreferSP [virtual]

Prefer SP when returning the base register for a frame‐index reference.

getInitialCFAOffset [virtual]

Return initial CFA offset value i.e. the one valid at the beginning of the function (before any stack operations).

getInitialCFARegister [virtual]

Return initial CFA register value i.e. the one valid at the beginning of the function (before any stack operations).

getMustPreserveRegisters

Return registers that must be preserved across the function.

getNonLocalFrameIndexReference [virtual]

Return the offset used to reference a non‐local frame index.

getOffsetOfLocalArea

getOffsetOfLocalArea ‐ This method returns the offset of the local area from the stack pointer on entrance to a function.

getStackAlign

Return the stack alignment required on function entry.

getStackAlignment

Return how many bytes the stack pointer must be aligned to on entry.

getStackGrowthDirection

getStackGrowthDirection ‐ Return the direction the stack grows

getStackIDForScalableVectors [virtual]

Returns the StackID that scalable vectors should be associated with.

getStackThreshold [virtual]

getStackThreshold ‐ Return the maximum stack size

getTransientStackAlign

getTransientStackAlignment ‐ This method returns the number of bytes to which the stack pointer must be aligned at all times, even between calls.

getWinEHParentFrameOffset [virtual]

Return the Windows EH parent‐frame offset for this function.

hasFP

Return true if the function should have a dedicated frame pointer.

hasReservedCallFrame [virtual]

Return true if the call frame is included as part of the stack frame.

inlineStackProbe [virtual]

Replace a StackProbe stub (if any) with the actual probe code inline

isProfitableForNoCSROpt [virtual]

Check if the no‐CSR optimisation is profitable for the given function.

isStackIdSafeForLocalArea [virtual]

This method returns whether or not it is safe for an object with the given stack id to be bundled into the local area.

isStackRealignable

isStackRealignable ‐ This method returns whether the stack can be realigned.

isSupportedStackID [virtual]

Return true if the target supports allocating objects with stack ID ID.

needsFrameIndexResolution [virtual]

Return whether frame‐index operands need resolution for this function.

orderFrameObjects [virtual]

Order the symbols in the local stack frame.

processFunctionBeforeFrameFinalized [virtual]

Hook called immediately before the function's frame layout is finalized.

processFunctionBeforeFrameIndicesReplaced [virtual]

Hook called after frame finalization but before FI operands are replaced.

resetCFIToInitialState [virtual]

Emit CFI instructions that recreate the state of the unwind information upon function entry.

restoreCalleeSavedRegister

Restore a single callee‐saved register.

restoreCalleeSavedRegisters [virtual]

Restore all callee‐saved registers, or report that per‐register loads should be used instead.

spillCalleeSavedRegister

spillCalleeSavedRegister ‐ Default implementation for spilling a single callee saved register.

spillCalleeSavedRegisters [virtual]

Spill all callee‐saved registers, or report that per‐register stores should be used instead.

spillFPBP [virtual]

If frame pointer or base pointer is clobbered by an instruction, we should spill/restore it around that instruction.

stackProbeFunctionModifiesSP [virtual]

Does the stack probe function call return with a modified stack pointer?

targetHandlesStackFrameRounding [virtual]

targetHandlesStackFrameRounding ‐ Returns true if the target is responsible for rounding up the stack frame (probably at emitPrologue time).

Static Member Functions

Name

Description

isSafeForNoCSROpt

Check if given function is safe for not having callee saved registers. This is used when interprocedural register allocation is enabled.

Protected Member Functions

Name

Description

hasFPImpl [virtual]

Target‐specific predicate for whether MF needs a frame pointer.

Created with MrDocs