class MachineFrameInfo
Declaration
class MachineFrameInfo { /* full declaration omitted */ };
Description
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted. This class is key to allowing stack frame representation optimizations, such as frame pointer elimination. It also allows more mundane (but still important) optimizations, such as reordering of abstract objects on the stack frame. To support this, the class assigns unique integer identifiers to stack objects requested clients. These identifiers are negative integers for fixed stack objects (such as arguments passed on the stack) or nonnegative for objects that may be reordered. Instructions which refer to stack objects use a special MO_FrameIndex operand to represent these frame indexes. Because this class keeps track of all references to the stack frame, it knows when a variable sized object is allocated on the stack. This is the sole condition which prevents frame pointer elimination, which is an important optimization on register-poor architectures. Because original variable sized alloca's in the source program are the only source of variable sized stack objects, it is safe to decide whether there will be any variable sized objects before all stack objects are known (for example, register allocator spill code never needs variable sized objects). When prolog/epilog code emission is performed, the final stack frame is built and the machine instructions are modified to refer to the actual stack offsets of the object, eliminating all MO_FrameIndex operands from the program. Abstract Stack Frame Information
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:105
Member Variables
- private llvm::Align StackAlignment
- The alignment of the stack.
- private bool StackRealignable
- Can the stack be realigned. This can be false if the target does not support stack realignment, or if the user asks us not to realign the stack. In this situation, overaligned allocas are all treated as dynamic allocations and the target must handle them as part of DYNAMIC_STACKALLOC lowering. All non-alloca stack objects have their alignment clamped to the base ABI stack alignment. FIXME: There is room for improvement in this case, in terms of grouping overaligned allocas into a "secondary stack frame" and then only use a single alloca to allocate this frame and only a single virtual register to access it. Currently, without such an optimization, each such alloca gets its own dynamic realignment.
- private bool ForcedRealign
- Whether the function has the \c alignstack attribute.
- private std::vector<StackObject> Objects
- The list of stack objects allocated.
- private unsigned int NumFixedObjects = 0
- This contains the number of fixed objects contained on the stack. Because fixed objects are stored at a negative index in the Objects list, this is also the index to the 0th object in the list.
- private bool HasVarSizedObjects = false
- This boolean keeps track of whether any variable sized objects have been allocated yet.
- private bool FrameAddressTaken = false
- This boolean keeps track of whether there is a call to builtin @ llvm.frameaddress.
- private bool ReturnAddressTaken = false
- This boolean keeps track of whether there is a call to builtin @ llvm.returnaddress.
- private bool HasStackMap = false
- This boolean keeps track of whether there is a call to builtin @ llvm.experimental.stackmap.
- private bool HasPatchPoint = false
- This boolean keeps track of whether there is a call to builtin @ llvm.experimental.patchpoint.
- private uint64_t StackSize = 0
- The prolog/epilog code inserter calculates the final stack offsets for all of the fixed size objects, updating the Objects list above. It then updates StackSize to contain the number of bytes that need to be allocated on entry to the function.
- private int OffsetAdjustment = 0
- The amount that a frame offset needs to be adjusted to have the actual offset from the stack/frame pointer. The exact usage of this is target-dependent, but it is typically used to adjust between SP-relative and FP-relative offsets. E.G., if objects are accessed via SP then OffsetAdjustment is zero; if FP is used, OffsetAdjustment is set to the distance between the initial SP and the value in FP. For many targets, this value is only used when generating debug info (via TargetRegisterInfo::getFrameIndexReference); when generating code, the corresponding adjustments are performed directly.
- private llvm::Align MaxAlignment
- The prolog/epilog code inserter may process objects that require greater alignment than the default alignment the target provides. To handle this, MaxAlignment is set to the maximum alignment needed by the objects on the current frame. If this is greater than the native alignment maintained by the compiler, dynamic alignment code will be needed.
- private bool AdjustsStack = false
- Set to true if this function adjusts the stack -- e.g., when calling another function. This is only valid during and after prolog/epilog code insertion.
- private bool HasCalls = false
- Set to true if this function has any function calls.
- private int StackProtectorIdx = -1
- The frame index for the stack protector.
- private int FunctionContextIdx = -1
- The frame index for the function context. Used for SjLj exceptions.
- private unsigned int MaxCallFrameSize = ~0U
- This contains the size of the largest call frame if the target uses frame setup/destroy pseudo instructions (as defined in the TargetFrameInfo class). This information is important for frame pointer elimination. It is only valid during and after prolog/epilog code insertion.
- private unsigned int CVBytesOfCalleeSavedRegisters = 0
- The number of bytes of callee saved registers that the target wants to report for the current function in the CodeView S_FRAMEPROC record.
- private std::vector<CalleeSavedInfo> CSInfo
- The prolog/epilog code inserter fills in this vector with each callee saved register saved in either the frame or a different register. Beyond its use by the prolog/ epilog code inserter, this data is used for debug info and exception handling.
- private bool CSIValid = false
- Has CSInfo been set yet?
- private SmallVector<std::pair<int, int64_t>, 32> LocalFrameObjects
- References to frame indices which are mapped into the local frame allocation block. <FrameIdx , LocalOffset>
- private int64_t LocalFrameSize = 0
- Size of the pre-allocated local frame block.
- private llvm::Align LocalFrameMaxAlign
- Required alignment of the local object blob, which is the strictest alignment of any object in it.
- private bool UseLocalStackAllocationBlock = false
- Whether the local object blob needs to be allocated together. If not, PEI should ignore the isPreAllocated flags on the stack objects and just allocate them normally.
- private bool HasOpaqueSPAdjustment = false
- True if the function dynamically adjusts the stack pointer through some opaque mechanism like inline assembly or Win32 EH.
- private bool HasCopyImplyingStackAdjustment = false
- True if the function contains operations which will lower down to instructions which manipulate the stack pointer.
- private bool HasVAStart = false
- True if the function contains a call to the llvm.vastart intrinsic.
- private bool HasMustTailInVarArgFunc = false
- True if this is a varargs function that contains a musttail call.
- private bool HasTailCall = false
- True if this function contains a tail call. If so immutable objects like function arguments are no longer so. A tail call *can* override fixed stack objects like arguments so we can't treat them as immutable.
- private llvm::MachineBasicBlock* Save = nullptr
- Not null, if shrink-wrapping found a better place for the prologue.
- private llvm::MachineBasicBlock* Restore = nullptr
- Not null, if shrink-wrapping found a better place for the epilogue.
- private uint64_t UnsafeStackSize = 0
- Size of the UnsafeStack Frame
Method Overview
- public int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool IsImmutable, bool isAliased = false)
- public int CreateFixedSpillStackObject(uint64_t Size, int64_t SPOffset, bool IsImmutable = false)
- public int CreateSpillStackObject(uint64_t Size, llvm::Align Alignment)
- public int CreateStackObject(uint64_t Size, llvm::Align Alignment, bool isSpillSlot, const llvm::AllocaInst * Alloca = nullptr, uint8_t ID = 0)
- public int CreateVariableSizedObject(llvm::Align Alignment, const llvm::AllocaInst * Alloca)
- public MachineFrameInfo(const llvm::MachineFrameInfo &)
- public MachineFrameInfo(llvm::Align StackAlignment, bool StackRealignable, bool ForcedRealign)
- public void RemoveStackObject(int ObjectIdx)
- public bool adjustsStack() const
- public void clearObjectAllocation(int ObjectIdx)
- public void computeMaxCallFrameSize(const llvm::MachineFunction & MF)
- public void dump(const llvm::MachineFunction & MF) const
- public void ensureMaxAlignment(llvm::Align Alignment)
- public uint64_t estimateStackSize(const llvm::MachineFunction & MF) const
- public unsigned int getCVBytesOfCalleeSavedRegisters() const
- public const std::vector<CalleeSavedInfo> & getCalleeSavedInfo() const
- public std::vector<CalleeSavedInfo> & getCalleeSavedInfo()
- public int getFunctionContextIndex() const
- public llvm::Align getLocalFrameMaxAlign() const
- public int64_t getLocalFrameObjectCount() const
- public std::pair<int, int64_t> getLocalFrameObjectMap(int i) const
- public int64_t getLocalFrameSize() const
- public llvm::Align getMaxAlign() const
- public unsigned int getMaxCallFrameSize() const
- public unsigned int getNumFixedObjects() const
- public unsigned int getNumObjects() const
- public llvm::Align getObjectAlign(int ObjectIdx) const
- public const llvm::AllocaInst * getObjectAllocation(int ObjectIdx) const
- public int getObjectIndexBegin() const
- public int getObjectIndexEnd() const
- public int64_t getObjectOffset(int ObjectIdx) const
- public llvm::MachineFrameInfo::SSPLayoutKind getObjectSSPLayout(int ObjectIdx) const
- public int64_t getObjectSize(int ObjectIdx) const
- public int getOffsetAdjustment() const
- public llvm::BitVector getPristineRegs(const llvm::MachineFunction & MF) const
- public llvm::MachineBasicBlock * getRestorePoint() const
- public llvm::MachineBasicBlock * getSavePoint() const
- public uint8_t getStackID(int ObjectIdx) const
- public int getStackProtectorIndex() const
- public uint64_t getStackSize() const
- public uint64_t getUnsafeStackSize() const
- public bool getUseLocalStackAllocationBlock() const
- public bool hasCalls() const
- public bool hasCopyImplyingStackAdjustment() const
- public bool hasFunctionContextIndex() const
- public bool hasMustTailInVarArgFunc() const
- public bool hasOpaqueSPAdjustment() const
- public bool hasPatchPoint() const
- public bool hasStackMap() const
- public bool hasStackObjects() const
- public bool hasStackProtectorIndex() const
- public bool hasTailCall() const
- public bool hasVAStart() const
- public bool hasVarSizedObjects() const
- public bool isAliasedObjectIndex(int ObjectIdx) const
- public bool isCalleeSavedInfoValid() const
- public bool isDeadObjectIndex(int ObjectIdx) const
- public bool isFixedObjectIndex(int ObjectIdx) const
- public bool isFrameAddressTaken() const
- public bool isImmutableObjectIndex(int ObjectIdx) const
- public bool isMaxCallFrameSizeComputed() const
- public bool isObjectPreAllocated(int ObjectIdx) const
- public bool isObjectSExt(int ObjectIdx) const
- public bool isObjectZExt(int ObjectIdx) const
- public bool isReturnAddressTaken() const
- public bool isSpillSlotObjectIndex(int ObjectIdx) const
- public bool isStatepointSpillSlotObjectIndex(int ObjectIdx) const
- public bool isVariableSizedObjectIndex(int ObjectIdx) const
- public void mapLocalFrameObject(int ObjectIndex, int64_t Offset)
- public void markAsStatepointSpillSlotObjectIndex(int ObjectIdx)
- public bool needsSplitStackProlog() const
- public void print(const llvm::MachineFunction & MF, llvm::raw_ostream & OS) const
- public void setAdjustsStack(bool V)
- public void setCVBytesOfCalleeSavedRegisters(unsigned int S)
- public void setCalleeSavedInfo(std::vector<CalleeSavedInfo> CSI)
- public void setCalleeSavedInfoValid(bool v)
- public void setFrameAddressIsTaken(bool T)
- public void setFunctionContextIndex(int I)
- public void setHasCalls(bool V)
- public void setHasCopyImplyingStackAdjustment(bool B)
- public void setHasMustTailInVarArgFunc(bool B)
- public void setHasOpaqueSPAdjustment(bool B)
- public void setHasPatchPoint(bool s = true)
- public void setHasStackMap(bool s = true)
- public void setHasTailCall(bool V = true)
- public void setHasVAStart(bool B)
- public void setIsImmutableObjectIndex(int ObjectIdx, bool IsImmutable)
- public void setLocalFrameMaxAlign(llvm::Align Alignment)
- public void setLocalFrameSize(int64_t sz)
- public void setMaxCallFrameSize(unsigned int S)
- public void setObjectAlignment(int ObjectIdx, llvm::Align Alignment)
- public void setObjectOffset(int ObjectIdx, int64_t SPOffset)
- public void setObjectSExt(int ObjectIdx, bool IsSExt)
- public void setObjectSSPLayout(int ObjectIdx, llvm::MachineFrameInfo::SSPLayoutKind Kind)
- public void setObjectSize(int ObjectIdx, int64_t Size)
- public void setObjectZExt(int ObjectIdx, bool IsZExt)
- public void setOffsetAdjustment(int Adj)
- public void setRestorePoint(llvm::MachineBasicBlock * NewRestore)
- public void setReturnAddressIsTaken(bool s)
- public void setSavePoint(llvm::MachineBasicBlock * NewSave)
- public void setStackID(int ObjectIdx, uint8_t ID)
- public void setStackProtectorIndex(int I)
- public void setStackSize(uint64_t Size)
- public void setUnsafeStackSize(uint64_t Size)
- public void setUseLocalStackAllocationBlock(bool v)
Methods
¶int CreateFixedObject(uint64_t Size,
int64_t SPOffset,
bool IsImmutable,
bool isAliased = false)
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:671
Parameters
- uint64_t Size
- int64_t SPOffset
- bool IsImmutable
- bool isAliased = false
¶int CreateFixedSpillStackObject(
uint64_t Size,
int64_t SPOffset,
bool IsImmutable = 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:676
Parameters
- uint64_t Size
- int64_t SPOffset
- bool IsImmutable = false
¶int CreateSpillStackObject(uint64_t Size,
llvm::Align 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:765
Parameters
- uint64_t Size
- llvm::Align Alignment
¶int CreateStackObject(
uint64_t Size,
llvm::Align 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:760
Parameters
- uint64_t Size
- llvm::Align Alignment
- bool isSpillSlot
- const llvm::AllocaInst* Alloca = nullptr
- uint8_t ID = 0
¶int CreateVariableSizedObject(
llvm::Align 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:776
Parameters
- llvm::Align Alignment
- const llvm::AllocaInst* Alloca
¶MachineFrameInfo(const llvm::MachineFrameInfo&)
MachineFrameInfo(const llvm::MachineFrameInfo&)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:346
Parameters
- const llvm::MachineFrameInfo&
¶MachineFrameInfo(llvm::Align StackAlignment,
bool StackRealignable,
bool ForcedRealign)
MachineFrameInfo(llvm::Align StackAlignment,
bool StackRealignable,
bool ForcedRealign)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:341
Parameters
- llvm::Align StackAlignment
- bool StackRealignable
- bool ForcedRealign
¶void RemoveStackObject(int ObjectIdx)
void RemoveStackObject(int ObjectIdx)
Description
Remove or mark dead a statically sized stack object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:768
Parameters
- int ObjectIdx
¶bool adjustsStack() const
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:601
¶void clearObjectAllocation(int ObjectIdx)
void clearObjectAllocation(int ObjectIdx)
Description
Remove the underlying Alloca of the specified stack object if it exists. This generally should not be used and is for reduction tooling.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:510
Parameters
- int ObjectIdx
¶void computeMaxCallFrameSize(
const llvm::MachineFunction& MF)
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:639
Parameters
- const llvm::MachineFunction& MF
¶void dump(const llvm::MachineFunction& MF) const
void dump(const llvm::MachineFunction& MF) const
Description
dump - Print the function to stderr.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:819
Parameters
- const llvm::MachineFunction& MF
¶void ensureMaxAlignment(llvm::Align Alignment)
void ensureMaxAlignment(llvm::Align Alignment)
Description
Make sure the function is at least Align bytes aligned.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:596
Parameters
- llvm::Align Alignment
¶uint64_t estimateStackSize(
const llvm::MachineFunction& MF) const
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:583
Parameters
- const llvm::MachineFunction& MF
¶unsigned int getCVBytesOfCalleeSavedRegisters()
const
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:660
¶const std::vector<CalleeSavedInfo>&
getCalleeSavedInfo() const
const std::vector<CalleeSavedInfo>&
getCalleeSavedInfo() const
Description
Returns a reference to call saved info vector for the current function.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:779
¶std::vector<CalleeSavedInfo>& getCalleeSavedInfo()
std::vector<CalleeSavedInfo>& getCalleeSavedInfo()
Description
\copydoc getCalleeSavedInfo()
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:783
¶int getFunctionContextIndex() const
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:363
¶llvm::Align getLocalFrameMaxAlign() const
llvm::Align getLocalFrameMaxAlign() const
Description
Return the required alignment of the local object blob.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:446
¶int64_t getLocalFrameObjectCount() const
int64_t getLocalFrameObjectCount() const
Description
Return the number of objects allocated into the local object block.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:431
¶std::pair<int, int64_t> getLocalFrameObjectMap(
int i) const
std::pair<int, int64_t> getLocalFrameObjectMap(
int i) const
Description
Get the local offset mapping for a for an object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:424
Parameters
- int i
¶int64_t getLocalFrameSize() const
int64_t getLocalFrameSize() const
Description
Get the size of the local object blob.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:437
¶llvm::Align getMaxAlign() const
llvm::Align getMaxAlign() 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:593
¶unsigned int getMaxCallFrameSize() const
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:646
¶unsigned int getNumFixedObjects() const
unsigned int getNumFixedObjects() const
Description
Return the number of fixed objects.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:412
¶unsigned int getNumObjects() const
unsigned int getNumObjects() const
Description
Return the number of objects.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:415
¶llvm::Align getObjectAlign(int ObjectIdx) const
llvm::Align getObjectAlign(int ObjectIdx) const
Description
Return the alignment of the specified stack object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:483
Parameters
- int ObjectIdx
¶const llvm::AllocaInst* getObjectAllocation(
int ObjectIdx) const
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:502
Parameters
- int ObjectIdx
¶int getObjectIndexBegin() const
int getObjectIndexBegin() const
Description
Return the minimum frame object index.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:406
¶int getObjectIndexEnd() const
int getObjectIndexEnd() const
Description
Return one past the maximum frame object index.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:409
¶int64_t getObjectOffset(int ObjectIdx) const
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:518
Parameters
- int ObjectIdx
¶llvm::MachineFrameInfo::SSPLayoutKind
getObjectSSPLayout(int ObjectIdx) const
llvm::MachineFrameInfo::SSPLayoutKind
getObjectSSPLayout(int ObjectIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:560
Parameters
- int ObjectIdx
¶int64_t getObjectSize(int ObjectIdx) const
int64_t getObjectSize(int ObjectIdx) const
Description
Return the size of the specified object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:469
Parameters
- int ObjectIdx
¶int getOffsetAdjustment() const
int getOffsetAdjustment() const
Description
Return the correction for frame offsets.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:586
¶llvm::BitVector getPristineRegs(
const llvm::MachineFunction& MF) const
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:812
Parameters
- const llvm::MachineFunction& MF
¶llvm::MachineBasicBlock* getRestorePoint() const
llvm::MachineBasicBlock* getRestorePoint() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:798
¶llvm::MachineBasicBlock* getSavePoint() const
llvm::MachineBasicBlock* getSavePoint() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:796
¶uint8_t getStackID(int ObjectIdx) const
uint8_t getStackID(int ObjectIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:723
Parameters
- int ObjectIdx
¶int getStackProtectorIndex() const
int getStackProtectorIndex() const
Description
Return the index for the stack protector object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:357
¶uint64_t getStackSize() const
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:577
¶uint64_t getUnsafeStackSize() const
uint64_t getUnsafeStackSize() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:801
¶bool getUseLocalStackAllocationBlock() const
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:450
¶bool hasCalls() const
bool hasCalls() const
Description
Return true if the current function has any function calls.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:605
¶bool hasCopyImplyingStackAdjustment() const
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:614
¶bool hasFunctionContextIndex() const
bool hasFunctionContextIndex() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:365
¶bool hasMustTailInVarArgFunc() const
bool hasMustTailInVarArgFunc() const
Description
Returns true if the function is variadic and contains a musttail call.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:626
¶bool hasOpaqueSPAdjustment() const
bool hasOpaqueSPAdjustment() const
Description
Returns true if the function contains opaque dynamic stack adjustments.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:609
¶bool hasPatchPoint() const
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:388
¶bool hasStackMap() const
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:382
¶bool hasStackObjects() const
bool hasStackObjects() const
Description
Return true if there are any stack objects in this function.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:349
¶bool hasStackProtectorIndex() const
bool hasStackProtectorIndex() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:359
¶bool hasTailCall() const
bool hasTailCall() const
Description
Returns true if the function contains a tail call.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:630
¶bool hasVAStart() const
bool hasVAStart() const
Description
Returns true if the function calls the llvm.va_start intrinsic.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:622
¶bool hasVarSizedObjects() const
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:354
¶bool isAliasedObjectIndex(int ObjectIdx) const
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:686
Parameters
- int ObjectIdx
¶bool isCalleeSavedInfoValid() const
bool isCalleeSavedInfoValid() const
Description
Has the callee saved info been calculated yet?
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:792
¶bool isDeadObjectIndex(int ObjectIdx) const
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:737
Parameters
- int ObjectIdx
¶bool isFixedObjectIndex(int ObjectIdx) const
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:680
Parameters
- int ObjectIdx
¶bool isFrameAddressTaken() const
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:370
¶bool isImmutableObjectIndex(int ObjectIdx) const
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:693
Parameters
- int ObjectIdx
¶bool isMaxCallFrameSizeComputed() const
bool isMaxCallFrameSizeComputed() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:653
¶bool isObjectPreAllocated(int ObjectIdx) const
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:462
Parameters
- int ObjectIdx
¶bool isObjectSExt(int ObjectIdx) const
bool isObjectSExt(int ObjectIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:538
Parameters
- int ObjectIdx
¶bool isObjectZExt(int ObjectIdx) const
bool isObjectZExt(int ObjectIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:526
Parameters
- int ObjectIdx
¶bool isReturnAddressTaken() const
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:376
¶bool isSpillSlotObjectIndex(int ObjectIdx) const
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:710
Parameters
- int ObjectIdx
¶bool isStatepointSpillSlotObjectIndex(
int ObjectIdx) const
bool isStatepointSpillSlotObjectIndex(
int ObjectIdx) const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:716
Parameters
- int ObjectIdx
¶bool isVariableSizedObjectIndex(
int ObjectIdx) const
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:745
Parameters
- int ObjectIdx
¶void mapLocalFrameObject(int ObjectIndex,
int64_t Offset)
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:418
Parameters
- int ObjectIndex
- int64_t Offset
¶void markAsStatepointSpillSlotObjectIndex(
int ObjectIdx)
void markAsStatepointSpillSlotObjectIndex(
int ObjectIdx)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:751
Parameters
- int ObjectIdx
¶bool needsSplitStackProlog() const
bool needsSplitStackProlog() const
Description
Return true if this function requires a split stack prolog, even if it uses no stack space. This is only meaningful for functions where MachineFunction::shouldSplitStack() returns true.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:401
¶void print(const llvm::MachineFunction& MF,
llvm::raw_ostream& OS) const
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:816
Parameters
- const llvm::MachineFunction& MF
- llvm::raw_ostream& OS
¶void setAdjustsStack(bool V)
void setAdjustsStack(bool V)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:602
Parameters
- bool V
¶void setCVBytesOfCalleeSavedRegisters(
unsigned int S)
void setCVBytesOfCalleeSavedRegisters(
unsigned int S)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:663
Parameters
- unsigned int S
¶void setCalleeSavedInfo(
std::vector<CalleeSavedInfo> CSI)
void setCalleeSavedInfo(
std::vector<CalleeSavedInfo> CSI)
Description
Used by prolog/epilog inserter to set the function's callee saved information.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:787
Parameters
- std::vector<CalleeSavedInfo> CSI
¶void setCalleeSavedInfoValid(bool v)
void setCalleeSavedInfoValid(bool v)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:794
Parameters
- bool v
¶void setFrameAddressIsTaken(bool T)
void setFrameAddressIsTaken(bool T)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:371
Parameters
- bool T
¶void setFunctionContextIndex(int I)
void setFunctionContextIndex(int I)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:364
Parameters
- int I
¶void setHasCalls(bool V)
void setHasCalls(bool V)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:606
Parameters
- bool V
¶void setHasCopyImplyingStackAdjustment(bool B)
void setHasCopyImplyingStackAdjustment(bool B)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:617
Parameters
- bool B
¶void setHasMustTailInVarArgFunc(bool B)
void setHasMustTailInVarArgFunc(bool B)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:627
Parameters
- bool B
¶void setHasOpaqueSPAdjustment(bool B)
void setHasOpaqueSPAdjustment(bool B)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:610
Parameters
- bool B
¶void setHasPatchPoint(bool s = true)
void setHasPatchPoint(bool s = true)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:389
Parameters
- bool s = true
¶void setHasStackMap(bool s = true)
void setHasStackMap(bool s = true)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:383
Parameters
- bool s = true
¶void setHasTailCall(bool V = true)
void setHasTailCall(bool V = true)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:631
Parameters
- bool V = true
¶void setHasVAStart(bool B)
void setHasVAStart(bool B)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:623
Parameters
- bool B
¶void setIsImmutableObjectIndex(int ObjectIdx,
bool IsImmutable)
void setIsImmutableObjectIndex(int ObjectIdx,
bool IsImmutable)
Description
Marks the immutability of an object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:703
Parameters
- int ObjectIdx
- bool IsImmutable
¶void setLocalFrameMaxAlign(llvm::Align Alignment)
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:441
Parameters
- llvm::Align Alignment
¶void setLocalFrameSize(int64_t sz)
void setLocalFrameSize(int64_t sz)
Description
Set the size of the local object blob.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:434
Parameters
- int64_t sz
¶void setMaxCallFrameSize(unsigned int S)
void setMaxCallFrameSize(unsigned int S)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:656
Parameters
- unsigned int S
¶void setObjectAlignment(int ObjectIdx,
llvm::Align Alignment)
void setObjectAlignment(int ObjectIdx,
llvm::Align Alignment)
Description
setObjectAlignment - Change the alignment of the specified stack object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:490
Parameters
- int ObjectIdx
- llvm::Align Alignment
¶void setObjectOffset(int ObjectIdx,
int64_t SPOffset)
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:552
Parameters
- int ObjectIdx
- int64_t SPOffset
¶void setObjectSExt(int ObjectIdx, bool IsSExt)
void setObjectSExt(int ObjectIdx, bool IsSExt)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:544
Parameters
- int ObjectIdx
- bool IsSExt
¶void setObjectSSPLayout(
int ObjectIdx,
llvm::MachineFrameInfo::SSPLayoutKind Kind)
void setObjectSSPLayout(
int ObjectIdx,
llvm::MachineFrameInfo::SSPLayoutKind Kind)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:566
Parameters
- int ObjectIdx
- llvm::MachineFrameInfo::SSPLayoutKind Kind
¶void setObjectSize(int ObjectIdx, int64_t Size)
void setObjectSize(int ObjectIdx, int64_t Size)
Description
Change the size of the specified stack object.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:476
Parameters
- int ObjectIdx
- int64_t Size
¶void setObjectZExt(int ObjectIdx, bool IsZExt)
void setObjectZExt(int ObjectIdx, bool IsZExt)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:532
Parameters
- int ObjectIdx
- bool IsZExt
¶void setOffsetAdjustment(int Adj)
void setOffsetAdjustment(int Adj)
Description
Set the correction for frame offsets.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:589
Parameters
- int Adj
¶void setRestorePoint(
llvm::MachineBasicBlock* NewRestore)
void setRestorePoint(
llvm::MachineBasicBlock* NewRestore)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:799
Parameters
- llvm::MachineBasicBlock* NewRestore
¶void setReturnAddressIsTaken(bool s)
void setReturnAddressIsTaken(bool s)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:377
Parameters
- bool s
¶void setSavePoint(
llvm::MachineBasicBlock* NewSave)
void setSavePoint(
llvm::MachineBasicBlock* NewSave)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:797
Parameters
- llvm::MachineBasicBlock* NewSave
¶void setStackID(int ObjectIdx, uint8_t ID)
void setStackID(int ObjectIdx, uint8_t ID)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:728
Parameters
- int ObjectIdx
- uint8_t ID
¶void setStackProtectorIndex(int I)
void setStackProtectorIndex(int I)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:358
Parameters
- int I
¶void setStackSize(uint64_t Size)
void setStackSize(uint64_t Size)
Description
Set the size of the stack.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:580
Parameters
- uint64_t Size
¶void setUnsafeStackSize(uint64_t Size)
void setUnsafeStackSize(uint64_t Size)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:802
Parameters
- uint64_t Size
¶void setUseLocalStackAllocationBlock(bool v)
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:457
Parameters
- bool v