class MachineFrameInfo

Declaration

class MachineFrameInfo { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:106

Method Overview

Methods

int CreateFixedObject(uint64_t Size,
                      int64_t SPOffset,
                      bool IsImmutable,
                      bool isAliased = false)

Description

Create a new object at a fixed location on the stack. All fixed objects should be created before other objects are created for efficiency. By default, fixed objects are not pointed to by LLVM IR values. This returns an index with a negative value.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:648

Parameters

uint64_t Size
int64_t SPOffset
bool IsImmutable
bool isAliased = false

int CreateFixedSpillStackObject(
    uint64_t Size,
    int64_t SPOffset,
    bool IsImmutable = false)

Description

Create a spill slot at a fixed location on the stack. Returns an index with a negative value.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:653

Parameters

uint64_t Size
int64_t SPOffset
bool IsImmutable = false

inline int CreateSpillStackObject(
    uint64_t Size,
    unsigned int Alignment)

Description

FIXME: Remove this function when transition to Align is over.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:752

Parameters

uint64_t Size
unsigned int Alignment

int CreateSpillStackObject(uint64_t Size,
                           llvm::Align Alignment)

Description

Create a new statically sized stack object that represents a spill slot, returning a nonnegative identifier to represent it.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:750

Parameters

uint64_t Size
llvm::Align Alignment

inline int CreateStackObject(
    uint64_t Size,
    unsigned int Alignment,
    bool isSpillSlot,
    const llvm::AllocaInst* Alloca = nullptr,
    uint8_t ID = 0)

Description

FIXME: Remove this function when transition to Align is over.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:740

Parameters

uint64_t Size
unsigned int Alignment
bool isSpillSlot
const llvm::AllocaInst* Alloca = nullptr
uint8_t ID = 0

int CreateStackObject(
    uint64_t Size,
    llvm::Align Alignment,
    bool isSpillSlot,
    const llvm::AllocaInst* Alloca = nullptr,
    uint8_t ID = 0)

Description

Create a new statically sized stack object, returning a nonnegative identifier to represent it.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:737

Parameters

uint64_t Size
llvm::Align Alignment
bool isSpillSlot
const llvm::AllocaInst* Alloca = nullptr
uint8_t ID = 0

int CreateVariableSizedObject(
    unsigned int Alignment,
    const llvm::AllocaInst* Alloca)

Description

FIXME: Remove this function when transition to Align is over.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:767

Parameters

unsigned int Alignment
const llvm::AllocaInst* Alloca

int CreateVariableSizedObject(
    llvm::Align Alignment,
    const llvm::AllocaInst* Alloca)

Description

Notify the MachineFrameInfo object that a variable sized object has been created. This must be created whenever a variable sized object is created, whether or not the index returned is actually used.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:765

Parameters

llvm::Align Alignment
const llvm::AllocaInst* Alloca

MachineFrameInfo(unsigned int StackAlignment,
                 bool StackRealignable,
                 bool ForcedRealign)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:339

Parameters

unsigned int StackAlignment
bool StackRealignable
bool ForcedRealign

void RemoveStackObject(int ObjectIdx)

Description

Remove or mark dead a statically sized stack object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:757

Parameters

int ObjectIdx

bool adjustsStack() const

Description

Return true if this function adjusts the stack -- e.g., when calling another function. This is only valid during and after prolog/epilog code insertion.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:578

void computeMaxCallFrameSize(
    const llvm::MachineFunction& MF)

Description

Computes the maximum size of a callframe and the AdjustsStack property. This only works for targets defining TargetInstrInfo::getCallFrameSetupOpcode(), getCallFrameDestroyOpcode(), and getFrameSize(). This is usually computed by the prologue epilogue inserter but some targets may call this to compute it earlier.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:616

Parameters

const llvm::MachineFunction& MF

void dump(const llvm::MachineFunction& MF) const

Description

dump - Print the function to stderr.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:809

Parameters

const llvm::MachineFunction& MF

void ensureMaxAlignment(llvm::Align Alignment)

Description

Make sure the function is at least Align bytes aligned.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:569

Parameters

llvm::Align Alignment

inline void ensureMaxAlignment(unsigned int Align)

Description

FIXME: Remove this once transition to Align is over.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:571

Parameters

unsigned int Align

uint64_t estimateStackSize(
    const llvm::MachineFunction& MF) const

Description

Estimate and return the size of the stack frame.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:556

Parameters

const llvm::MachineFunction& MF

unsigned int getCVBytesOfCalleeSavedRegisters()
    const

Description

Returns how many bytes of callee-saved registers the target pushed in the prologue. Only used for debug info.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:637

const int& getCalleeSavedInfo() const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:772

int& getCalleeSavedInfo()

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:776

int getFunctionContextIndex() const

Description

Return the index for the function context object. This object is used for SjLj exceptions.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:359

llvm::Align getLocalFrameMaxAlign() const

Description

Return the required alignment of the local object blob.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:427

int64_t getLocalFrameObjectCount() const

Description

Return the number of objects allocated into the local object block.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:412

std::pair<int, int64_t> getLocalFrameObjectMap(
    int i) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:405

Parameters

int i

int64_t getLocalFrameSize() const

Description

Get the size of the local object blob.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:418

unsigned int getMaxAlignment() const

Description

Return the alignment in bytes that this function must be aligned to, which is greater than the default stack alignment provided by the target.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:566

unsigned int getMaxCallFrameSize() const

Description

Return the maximum size of a call frame that must be allocated for an outgoing function call. This is only available if CallFrameSetup/Destroy pseudo instructions are used by the target, and then only during or after prolog/epilog code insertion.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:623

unsigned int getNumFixedObjects() const

Description

Return the number of fixed objects.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:393

unsigned int getNumObjects() const

Description

Return the number of objects.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:396

unsigned int getObjectAlignment(
    int ObjectIdx) const

Description

Return the alignment of the specified stack object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:464

Parameters

int ObjectIdx

const llvm::AllocaInst* getObjectAllocation(
    int ObjectIdx) const

Description

Return the underlying Alloca of the specified stack object if it exists. Returns 0 if none exists.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:483

Parameters

int ObjectIdx

int getObjectIndexBegin() const

Description

Return the minimum frame object index.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:387

int getObjectIndexEnd() const

Description

Return one past the maximum frame object index.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:390

int64_t getObjectOffset(int ObjectIdx) const

Description

Return the assigned stack offset of the specified object from the incoming stack pointer.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:491

Parameters

int ObjectIdx

llvm::MachineFrameInfo::SSPLayoutKind
getObjectSSPLayout(int ObjectIdx) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:533

Parameters

int ObjectIdx

int64_t getObjectSize(int ObjectIdx) const

Description

Return the size of the specified object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:450

Parameters

int ObjectIdx

int getOffsetAdjustment() const

Description

Return the correction for frame offsets.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:559

llvm::BitVector getPristineRegs(
    const llvm::MachineFunction& MF) const

Description

Return a set of physical registers that are pristine. Pristine registers hold a value that is useless to the current function, but that must be preserved - they are callee saved registers that are not saved. Before the PrologueEpilogueInserter has placed the CSR spill code, this method always returns an empty set.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:802

Parameters

const llvm::MachineFunction& MF

llvm::MachineBasicBlock* getRestorePoint() const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:791

llvm::MachineBasicBlock* getSavePoint() const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:789

uint8_t getStackID(int ObjectIdx) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:700

Parameters

int ObjectIdx

int getStackProtectorIndex() const

Description

Return the index for the stack protector object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:353

uint64_t getStackSize() const

Description

Return the number of bytes that must be allocated to hold all of the fixed size frame objects. This is only valid after Prolog/Epilog code insertion has finalized the stack frame layout.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:550

bool getUseLocalStackAllocationBlock() const

Description

Get whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:431

bool hasCalls() const

Description

Return true if the current function has any function calls.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:582

bool hasCopyImplyingStackAdjustment() const

Description

Returns true if the function contains operations which will lower down to instructions which manipulate the stack pointer.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:591

bool hasMustTailInVarArgFunc() const

Description

Returns true if the function is variadic and contains a musttail call.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:603

bool hasOpaqueSPAdjustment() const

Description

Returns true if the function contains opaque dynamic stack adjustments.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:586

bool hasPatchPoint() const

Description

This method may be called any time after instruction selection is complete to determine if there is a call to builtin @ llvm.experimental.patchpoint.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:383

bool hasStackMap() const

Description

This method may be called any time after instruction selection is complete to determine if there is a call to builtin @ llvm.experimental.stackmap.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:377

bool hasStackObjects() const

Description

Return true if there are any stack objects in this function.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:345

bool hasStackProtectorIndex() const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:355

bool hasTailCall() const

Description

Returns true if the function contains a tail call.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:607

bool hasVAStart() const

Description

Returns true if the function calls the llvm.va_start intrinsic.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:599

bool hasVarSizedObjects() const

Description

This method may be called any time after instruction selection is complete to determine if the stack frame for this function contains any variable sized objects.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:350

bool isAliasedObjectIndex(int ObjectIdx) const

Description

Returns true if the specified index corresponds to an object that might be pointed to by an LLVM IR value.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:663

Parameters

int ObjectIdx

bool isCalleeSavedInfoValid() const

Description

Has the callee saved info been calculated yet?

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:785

bool isDeadObjectIndex(int ObjectIdx) const

Description

Returns true if the specified index corresponds to a dead object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:714

Parameters

int ObjectIdx

bool isFixedObjectIndex(int ObjectIdx) const

Description

Returns true if the specified index corresponds to a fixed stack object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:657

Parameters

int ObjectIdx

bool isFrameAddressTaken() const

Description

This method may be called any time after instruction selection is complete to determine if there is a call to @ llvm.frameaddress in this function.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:365

bool isImmutableObjectIndex(int ObjectIdx) const

Description

Returns true if the specified index corresponds to an immutable object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:670

Parameters

int ObjectIdx

bool isMaxCallFrameSizeComputed() const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:630

bool isObjectPreAllocated(int ObjectIdx) const

Description

Return true if the object was pre-allocated into the local block.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:443

Parameters

int ObjectIdx

bool isObjectSExt(int ObjectIdx) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:511

Parameters

int ObjectIdx

bool isObjectZExt(int ObjectIdx) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:499

Parameters

int ObjectIdx

bool isReturnAddressTaken() const

Description

This method may be called any time after instruction selection is complete to determine if there is a call to @ llvm.returnaddress in this function.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:371

bool isSpillSlotObjectIndex(int ObjectIdx) const

Description

Returns true if the specified index corresponds to a spill slot.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:687

Parameters

int ObjectIdx

bool isStatepointSpillSlotObjectIndex(
    int ObjectIdx) const

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:693

Parameters

int ObjectIdx

bool isVariableSizedObjectIndex(
    int ObjectIdx) const

Description

Returns true if the specified index corresponds to a variable sized object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:722

Parameters

int ObjectIdx

void mapLocalFrameObject(int ObjectIndex,
                         int64_t Offset)

Description

Map a frame index into the local object block

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:399

Parameters

int ObjectIndex
int64_t Offset

void markAsStatepointSpillSlotObjectIndex(
    int ObjectIdx)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:728

Parameters

int ObjectIdx

void print(const llvm::MachineFunction& MF,
           llvm::raw_ostream& OS) const

Description

Used by the MachineFunction printer to print information about stack objects. Implemented in MachineFunction.cpp.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:806

Parameters

const llvm::MachineFunction& MF
llvm::raw_ostream& OS

void setAdjustsStack(bool V)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:579

Parameters

bool V

void setCVBytesOfCalleeSavedRegisters(
    unsigned int S)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:640

Parameters

unsigned int S

void setCalleeSavedInfo(const int& CSI)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:780

Parameters

const int& CSI

void setCalleeSavedInfoValid(bool v)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:787

Parameters

bool v

void setFrameAddressIsTaken(bool T)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:366

Parameters

bool T

void setFunctionContextIndex(int I)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:360

Parameters

int I

void setHasCalls(bool V)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:583

Parameters

bool V

void setHasCopyImplyingStackAdjustment(bool B)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:594

Parameters

bool B

void setHasMustTailInVarArgFunc(bool B)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:604

Parameters

bool B

void setHasOpaqueSPAdjustment(bool B)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:587

Parameters

bool B

void setHasPatchPoint(bool s = true)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:384

Parameters

bool s = true

void setHasStackMap(bool s = true)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:378

Parameters

bool s = true

void setHasTailCall()

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:608

void setHasVAStart(bool B)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:600

Parameters

bool B

void setIsImmutableObjectIndex(int ObjectIdx,
                               bool IsImmutable)

Description

Marks the immutability of an object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:680

Parameters

int ObjectIdx
bool IsImmutable

void setLocalFrameMaxAlign(llvm::Align Alignment)

Description

Required alignment of the local object blob, which is the strictest alignment of any object in it.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:422

Parameters

llvm::Align Alignment

void setLocalFrameSize(int64_t sz)

Description

Set the size of the local object blob.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:415

Parameters

int64_t sz

void setMaxCallFrameSize(unsigned int S)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:633

Parameters

unsigned int S

void setObjectAlignment(int ObjectIdx,
                        unsigned int Align)

Description

setObjectAlignment - Change the alignment of the specified stack object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:471

Parameters

int ObjectIdx
unsigned int Align

void setObjectOffset(int ObjectIdx,
                     int64_t SPOffset)

Description

Set the stack frame offset of the specified object. The offset is relative to the stack pointer on entry to the function.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:525

Parameters

int ObjectIdx
int64_t SPOffset

void setObjectSExt(int ObjectIdx, bool IsSExt)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:517

Parameters

int ObjectIdx
bool IsSExt

void setObjectSSPLayout(
    int ObjectIdx,
    llvm::MachineFrameInfo::SSPLayoutKind Kind)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:539

Parameters

int ObjectIdx
llvm::MachineFrameInfo::SSPLayoutKind Kind

void setObjectSize(int ObjectIdx, int64_t Size)

Description

Change the size of the specified stack object.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:457

Parameters

int ObjectIdx
int64_t Size

void setObjectZExt(int ObjectIdx, bool IsZExt)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:505

Parameters

int ObjectIdx
bool IsZExt

void setOffsetAdjustment(int Adj)

Description

Set the correction for frame offsets.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:562

Parameters

int Adj

void setRestorePoint(
    llvm::MachineBasicBlock* NewRestore)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:792

Parameters

llvm::MachineBasicBlock* NewRestore

void setReturnAddressIsTaken(bool s)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:372

Parameters

bool s

void setSavePoint(
    llvm::MachineBasicBlock* NewSave)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:790

Parameters

llvm::MachineBasicBlock* NewSave

void setStackID(int ObjectIdx, uint8_t ID)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:705

Parameters

int ObjectIdx
uint8_t ID

void setStackProtectorIndex(int I)

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:354

Parameters

int I

void setStackSize(uint64_t Size)

Description

Set the size of the stack.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:553

Parameters

uint64_t Size

void setUseLocalStackAllocationBlock(bool v)

Description

setUseLocalStackAllocationBlock - Set whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly.

Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:438

Parameters

bool v