LLVM  6.0.0svn
Classes | Public Member Functions | List of all members
llvm::MachineFrameInfo Class Reference

The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted. More...

#include "llvm/CodeGen/MachineFrameInfo.h"

Public Member Functions

 MachineFrameInfo (unsigned StackAlignment, bool StackRealignable, bool ForcedRealign)
 
bool hasStackObjects () const
 Return true if there are any stack objects in this function. More...
 
bool hasVarSizedObjects () const
 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. More...
 
int getStackProtectorIndex () const
 Return the index for the stack protector object. More...
 
void setStackProtectorIndex (int I)
 
bool hasStackProtectorIndex () const
 
int getFunctionContextIndex () const
 Return the index for the function context object. More...
 
void setFunctionContextIndex (int I)
 
bool isFrameAddressTaken () const
 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. More...
 
void setFrameAddressIsTaken (bool T)
 
bool isReturnAddressTaken () const
 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. More...
 
void setReturnAddressIsTaken (bool s)
 
bool hasStackMap () const
 This method may be called any time after instruction selection is complete to determine if there is a call to builtin @llvm.experimental.stackmap. More...
 
void setHasStackMap (bool s=true)
 
bool hasPatchPoint () const
 This method may be called any time after instruction selection is complete to determine if there is a call to builtin @llvm.experimental.patchpoint. More...
 
void setHasPatchPoint (bool s=true)
 
int getObjectIndexBegin () const
 Return the minimum frame object index. More...
 
int getObjectIndexEnd () const
 Return one past the maximum frame object index. More...
 
unsigned getNumFixedObjects () const
 Return the number of fixed objects. More...
 
unsigned getNumObjects () const
 Return the number of objects. More...
 
void mapLocalFrameObject (int ObjectIndex, int64_t Offset)
 Map a frame index into the local object block. More...
 
std::pair< int, int64_t > getLocalFrameObjectMap (int i) const
 Get the local offset mapping for a for an object. More...
 
int64_t getLocalFrameObjectCount () const
 Return the number of objects allocated into the local object block. More...
 
void setLocalFrameSize (int64_t sz)
 Set the size of the local object blob. More...
 
int64_t getLocalFrameSize () const
 Get the size of the local object blob. More...
 
void setLocalFrameMaxAlign (unsigned Align)
 Required alignment of the local object blob, which is the strictest alignment of any object in it. More...
 
unsigned getLocalFrameMaxAlign () const
 Return the required alignment of the local object blob. More...
 
bool getUseLocalStackAllocationBlock () const
 Get whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly. More...
 
void setUseLocalStackAllocationBlock (bool v)
 setUseLocalStackAllocationBlock - Set whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly. More...
 
bool isObjectPreAllocated (int ObjectIdx) const
 Return true if the object was pre-allocated into the local block. More...
 
int64_t getObjectSize (int ObjectIdx) const
 Return the size of the specified object. More...
 
void setObjectSize (int ObjectIdx, int64_t Size)
 Change the size of the specified stack object. More...
 
unsigned getObjectAlignment (int ObjectIdx) const
 Return the alignment of the specified stack object. More...
 
void setObjectAlignment (int ObjectIdx, unsigned Align)
 setObjectAlignment - Change the alignment of the specified stack object. More...
 
const AllocaInstgetObjectAllocation (int ObjectIdx) const
 Return the underlying Alloca of the specified stack object if it exists. More...
 
int64_t getObjectOffset (int ObjectIdx) const
 Return the assigned stack offset of the specified object from the incoming stack pointer. More...
 
bool isObjectZExt (int ObjectIdx) const
 
void setObjectZExt (int ObjectIdx, bool IsZExt)
 
bool isObjectSExt (int ObjectIdx) const
 
void setObjectSExt (int ObjectIdx, bool IsSExt)
 
void setObjectOffset (int ObjectIdx, int64_t SPOffset)
 Set the stack frame offset of the specified object. More...
 
uint64_t getStackSize () const
 Return the number of bytes that must be allocated to hold all of the fixed size frame objects. More...
 
void setStackSize (uint64_t Size)
 Set the size of the stack. More...
 
unsigned estimateStackSize (const MachineFunction &MF) const
 Estimate and return the size of the stack frame. More...
 
int getOffsetAdjustment () const
 Return the correction for frame offsets. More...
 
void setOffsetAdjustment (int Adj)
 Set the correction for frame offsets. More...
 
unsigned getMaxAlignment () const
 Return the alignment in bytes that this function must be aligned to, which is greater than the default stack alignment provided by the target. More...
 
void ensureMaxAlignment (unsigned Align)
 Make sure the function is at least Align bytes aligned. More...
 
bool adjustsStack () const
 Return true if this function adjusts the stack – e.g., when calling another function. More...
 
void setAdjustsStack (bool V)
 
bool hasCalls () const
 Return true if the current function has any function calls. More...
 
void setHasCalls (bool V)
 
bool hasOpaqueSPAdjustment () const
 Returns true if the function contains opaque dynamic stack adjustments. More...
 
void setHasOpaqueSPAdjustment (bool B)
 
bool hasCopyImplyingStackAdjustment () const
 Returns true if the function contains operations which will lower down to instructions which manipulate the stack pointer. More...
 
void setHasCopyImplyingStackAdjustment (bool B)
 
bool hasVAStart () const
 Returns true if the function calls the llvm.va_start intrinsic. More...
 
void setHasVAStart (bool B)
 
bool hasMustTailInVarArgFunc () const
 Returns true if the function is variadic and contains a musttail call. More...
 
void setHasMustTailInVarArgFunc (bool B)
 
bool hasTailCall () const
 Returns true if the function contains a tail call. More...
 
void setHasTailCall ()
 
void computeMaxCallFrameSize (const MachineFunction &MF)
 Computes the maximum size of a callframe and the AdjustsStack property. More...
 
unsigned getMaxCallFrameSize () const
 Return the maximum size of a call frame that must be allocated for an outgoing function call. More...
 
bool isMaxCallFrameSizeComputed () const
 
void setMaxCallFrameSize (unsigned S)
 
int CreateFixedObject (uint64_t Size, int64_t SPOffset, bool Immutable, bool isAliased=false)
 Create a new object at a fixed location on the stack. More...
 
int CreateFixedSpillStackObject (uint64_t Size, int64_t SPOffset, bool Immutable=false)
 Create a spill slot at a fixed location on the stack. More...
 
bool isFixedObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to a fixed stack object. More...
 
bool isAliasedObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to an object that might be pointed to by an LLVM IR value. More...
 
bool isImmutableObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to an immutable object. More...
 
void setIsImmutableObjectIndex (int ObjectIdx, bool Immutable)
 Marks the immutability of an object. More...
 
bool isSpillSlotObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to a spill slot. More...
 
bool isStatepointSpillSlotObjectIndex (int ObjectIdx) const
 
uint8_t getStackID (int ObjectIdx) const
 
void setStackID (int ObjectIdx, uint8_t ID)
 
bool isDeadObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to a dead object. More...
 
bool isVariableSizedObjectIndex (int ObjectIdx) const
 Returns true if the specified index corresponds to a variable sized object. More...
 
void markAsStatepointSpillSlotObjectIndex (int ObjectIdx)
 
int CreateStackObject (uint64_t Size, unsigned Alignment, bool isSS, const AllocaInst *Alloca=nullptr, uint8_t ID=0)
 Create a new statically sized stack object, returning a nonnegative identifier to represent it. More...
 
int CreateSpillStackObject (uint64_t Size, unsigned Alignment)
 Create a new statically sized stack object that represents a spill slot, returning a nonnegative identifier to represent it. More...
 
void RemoveStackObject (int ObjectIdx)
 Remove or mark dead a statically sized stack object. More...
 
int CreateVariableSizedObject (unsigned Alignment, const AllocaInst *Alloca)
 Notify the MachineFrameInfo object that a variable sized object has been created. More...
 
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo () const
 Returns a reference to call saved info vector for the current function. More...
 
std::vector< CalleeSavedInfo > & getCalleeSavedInfo ()
 
void setCalleeSavedInfo (const std::vector< CalleeSavedInfo > &CSI)
 Used by prolog/epilog inserter to set the function's callee saved information. More...
 
bool isCalleeSavedInfoValid () const
 Has the callee saved info been calculated yet? More...
 
void setCalleeSavedInfoValid (bool v)
 
MachineBasicBlockgetSavePoint () const
 
void setSavePoint (MachineBasicBlock *NewSave)
 
MachineBasicBlockgetRestorePoint () const
 
void setRestorePoint (MachineBasicBlock *NewRestore)
 
BitVector getPristineRegs (const MachineFunction &MF) const
 Return a set of physical registers that are pristine. More...
 
void print (const MachineFunction &MF, raw_ostream &OS) const
 Used by the MachineFunction printer to print information about stack objects. More...
 
void dump (const MachineFunction &MF) const
 dump - Print the function to stderr. More...
 

Detailed 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

Definition at line 89 of file MachineFrameInfo.h.

Constructor & Destructor Documentation

◆ MachineFrameInfo()

llvm::MachineFrameInfo::MachineFrameInfo ( unsigned  StackAlignment,
bool  StackRealignable,
bool  ForcedRealign 
)
inlineexplicit

Definition at line 299 of file MachineFrameInfo.h.

Member Function Documentation

◆ adjustsStack()

bool llvm::MachineFrameInfo::adjustsStack ( ) const
inline

◆ computeMaxCallFrameSize()

void MachineFrameInfo::computeMaxCallFrameSize ( const MachineFunction MF)

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.

Definition at line 180 of file MachineFrameInfo.cpp.

References assert(), llvm::InlineAsm::Extra_IsAlignStack, llvm::TargetInstrInfo::getCallFrameDestroyOpcode(), llvm::TargetInstrInfo::getCallFrameSetupOpcode(), llvm::TargetInstrInfo::getFrameSize(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getSubtarget(), llvm::max(), MI, llvm::InlineAsm::MIOp_ExtraInfo, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, and TII.

Referenced by llvm::ARMTargetLowering::finalizeLowering().

◆ CreateFixedObject()

int MachineFrameInfo::CreateFixedObject ( uint64_t  Size,
int64_t  SPOffset,
bool  Immutable,
bool  isAliased = false 
)

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.

Definition at line 80 of file MachineFrameInfo.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), clampStackAlignment(), and llvm::MinAlign().

Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), llvm::analyzeArguments(), AnalyzeReturnValues(), CalculateTailCallArgDest(), CC_Lanai32_VarArg(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::XCoreFunctionInfo::createLRSpillSlot(), llvm::LanaiFrameLowering::determineCalleeSaves(), llvm::X86FrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::determineCalleeSaves(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), EnsureStackAlignment(), findUser(), getAbsolute(), getMOVL(), getNextIntArgReg(), llvm::MSP430TargetLowering::getReturnAddressFrameIndex(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::MIRParserImpl::initializeFrameInfo(), isSortedByValueNo(), llvm::SITargetLowering::isTypeDesirableForOp(), llvm::AMDGPUTargetLowering::loadStackInputValue(), llvm::SITargetLowering::LowerCall(), lowerCallResult(), LowerCallResult(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_32(), llvm::SparcTargetLowering::LowerFormalArguments_64(), LowerINTRINSIC_W_CHAIN(), llvm::X86CallLowering::lowerReturn(), llvm::ARMCallLowering::lowerReturn(), llvm::MipsTargetLowering::lowerSTORE(), LowerVASTART(), mayTailCallThisCC(), parsePhysicalReg(), PrepareCall(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), llvm::MSP430FrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::FunctionLoweringInfo::set(), shouldGuaranteeTCO(), and UnpackFromArgumentSlot().

◆ CreateFixedSpillStackObject()

int MachineFrameInfo::CreateFixedSpillStackObject ( uint64_t  Size,
int64_t  SPOffset,
bool  Immutable = false 
)

◆ CreateSpillStackObject()

int MachineFrameInfo::CreateSpillStackObject ( uint64_t  Size,
unsigned  Alignment 
)

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

Definition at line 62 of file MachineFrameInfo.cpp.

References clampStackAlignment(), CreateStackObject(), and ensureMaxAlignment().

Referenced by llvm::VirtRegMap::assignVirt2Phys(), llvm::HexagonFrameLowering::determineCalleeSaves(), llvm::X86FrameLowering::determineCalleeSaves(), and INITIALIZE_PASS().

◆ CreateStackObject()

int MachineFrameInfo::CreateStackObject ( uint64_t  Size,
unsigned  Alignment,
bool  isSS,
const AllocaInst Alloca = nullptr,
uint8_t  ID = 0 
)

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

Definition at line 49 of file MachineFrameInfo.cpp.

References assert(), clampStackAlignment(), and ensureMaxAlignment().

Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), assignCalleeSavedSpillSlots(), llvm::X86TargetLowering::BuildFILD(), CallingConvSupported(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::MipsFunctionInfo::createEhDataRegsFI(), llvm::XCoreFunctionInfo::createEHSpillSlot(), llvm::XCoreFunctionInfo::createFPSpillSlot(), llvm::MipsFunctionInfo::createISRRegFI(), llvm::XCoreFunctionInfo::createLRSpillSlot(), CreateSpillStackObject(), llvm::SelectionDAG::CreateStackTemporary(), llvm::MipsSEFrameLowering::determineCalleeSaves(), llvm::AArch64FrameLowering::determineCalleeSaves(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), EnsureStackAlignment(), getAddressForMemoryInput(), llvm::IRTranslator::getAnalysisUsage(), llvm::MipsFunctionInfo::getMoveF64ViaSpillFI(), getVectorCompareInfo(), haveEfficientBuildVectorPattern(), llvm::MIRParserImpl::initializeFrameInfo(), isSortedByValueNo(), LowerADJUST_TRAMPOLINE(), llvm::SparcTargetLowering::LowerCall_32(), lowerCallResult(), LowerCallResult(), llvm::TargetLowering::LowerCallTo(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), LowerShiftParts(), lowerUINT_TO_FP_vXi32(), PrepareCall(), llvm::SystemZFrameLowering::processFunctionBeforeFrameFinalized(), llvm::XCoreFrameLowering::processFunctionBeforeFrameFinalized(), and llvm::FunctionLoweringInfo::set().

◆ CreateVariableSizedObject()

int MachineFrameInfo::CreateVariableSizedObject ( unsigned  Alignment,
const AllocaInst Alloca 
)

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.

Definition at line 71 of file MachineFrameInfo.cpp.

References clampStackAlignment(), and ensureMaxAlignment().

Referenced by llvm::IRTranslator::getAnalysisUsage(), llvm::MIRParserImpl::initializeFrameInfo(), and llvm::FunctionLoweringInfo::set().

◆ dump()

LLVM_DUMP_METHOD void MachineFrameInfo::dump ( const MachineFunction MF) const

dump - Print the function to stderr.

Definition at line 246 of file MachineFrameInfo.cpp.

References llvm::dbgs(), and print().

◆ ensureMaxAlignment()

void MachineFrameInfo::ensureMaxAlignment ( unsigned  Align)

◆ estimateStackSize()

unsigned MachineFrameInfo::estimateStackSize ( const MachineFunction MF) const

◆ getCalleeSavedInfo() [1/2]

const std::vector<CalleeSavedInfo>& llvm::MachineFrameInfo::getCalleeSavedInfo ( ) const
inline

◆ getCalleeSavedInfo() [2/2]

std::vector<CalleeSavedInfo>& llvm::MachineFrameInfo::getCalleeSavedInfo ( )
inline

Definition at line 686 of file MachineFrameInfo.h.

◆ getFunctionContextIndex()

int llvm::MachineFrameInfo::getFunctionContextIndex ( ) const
inline

Return the index for the function context object.

This object is used for SjLj exceptions.

Definition at line 319 of file MachineFrameInfo.h.

Referenced by createPHIsForCMOVsInSinkBB(), and llvm::ARMTargetLowering::ReplaceNodeResults().

◆ getLocalFrameMaxAlign()

unsigned llvm::MachineFrameInfo::getLocalFrameMaxAlign ( ) const
inline

◆ getLocalFrameObjectCount()

int64_t llvm::MachineFrameInfo::getLocalFrameObjectCount ( ) const
inline

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

Definition at line 372 of file MachineFrameInfo.h.

References llvm::SmallVectorTemplateCommon< T >::size().

Referenced by AdjustStackOffset(), AssignProtectedObjSet(), and llvm::MIRPrinter::convertStackObjects().

◆ getLocalFrameObjectMap()

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

Get the local offset mapping for a for an object.

Definition at line 365 of file MachineFrameInfo.h.

References assert(), and llvm::SmallVectorTemplateCommon< T >::size().

Referenced by AdjustStackOffset(), AssignProtectedObjSet(), and llvm::MIRPrinter::convertStackObjects().

◆ getLocalFrameSize()

int64_t llvm::MachineFrameInfo::getLocalFrameSize ( ) const
inline

◆ getMaxAlignment()

unsigned llvm::MachineFrameInfo::getMaxAlignment ( ) const
inline

◆ getMaxCallFrameSize()

unsigned llvm::MachineFrameInfo::getMaxCallFrameSize ( ) const
inline

◆ getNumFixedObjects()

unsigned llvm::MachineFrameInfo::getNumFixedObjects ( ) const
inline

Return the number of fixed objects.

Definition at line 353 of file MachineFrameInfo.h.

Referenced by llvm::AVRFrameAnalyzer::runOnMachineFunction().

◆ getNumObjects()

unsigned llvm::MachineFrameInfo::getNumObjects ( ) const
inline

◆ getObjectAlignment()

unsigned llvm::MachineFrameInfo::getObjectAlignment ( int  ObjectIdx) const
inline

Return the alignment of the specified stack object.

Definition at line 422 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::addFrameReference(), AdjustStackOffset(), AssignProtectedObjSet(), buildMUBUFOffsetLoadStore(), llvm::MIRPrinter::convertStackObjects(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::TargetLoweringBase::emitPatchPoint(), estimateStackSize(), llvm::HexagonEvaluator::evaluate(), fixupFuncForFI(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getContiguousRangeOfSetBits(), getFrameIndexMMO(), getFrameIndexOperandNum(), llvm::R600FrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReference(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), llvm::MipsInstrInfo::GetMemOperand(), getMemsetStores(), getStartOrEndSlot(), getVCmpInst(), llvm::SelectionDAG::InferPtrAlignment(), isMemOPCandidate(), isScaledConstantInRange(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), false::IntervalSorter::operator()(), llvm::X86FrameLowering::orderFrameObjects(), llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::SIRegisterInfo::restoreSGPR(), scavengeStackSlot(), llvm::SIRegisterInfo::spillSGPR(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), and tryToElideArgumentCopy().

◆ getObjectAllocation()

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

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

Returns 0 if none exists.

Definition at line 438 of file MachineFrameInfo.h.

References assert().

Referenced by AssignProtectedObjSet(), llvm::MIRPrinter::convertStackObjects(), getStartOrEndSlot(), and isImplicitOperandIn().

◆ getObjectIndexBegin()

int llvm::MachineFrameInfo::getObjectIndexBegin ( ) const
inline

◆ getObjectIndexEnd()

int llvm::MachineFrameInfo::getObjectIndexEnd ( ) const
inline

◆ getObjectOffset()

int64_t llvm::MachineFrameInfo::getObjectOffset ( int  ObjectIdx) const
inline

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

Definition at line 446 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::AMDGPUTargetLowering::addTokenForArgument(), AdjustStackOffset(), AssignProtectedObjSet(), buildMUBUFOffsetLoadStore(), computeFreeStackSlots(), llvm::MIRPrinter::convertStackObjects(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::LanaiRegisterInfo::eliminateFrameIndex(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::BaseIndexOffset::equalBaseIndex(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), findBaseOffset(), llvm::TargetInstrInfo::foldMemoryOperand(), GetEHSpillList(), llvm::MipsSEFrameLowering::getFrameIndexReference(), llvm::SIFrameLowering::getFrameIndexReference(), llvm::SparcFrameLowering::getFrameIndexReference(), llvm::SystemZFrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::TargetFrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReferenceSP(), GetSpillList(), llvm::HexagonFrameLowering::insertCFIInstructions(), isConsecutiveLSLoc(), MatchingStackOffset(), mayTailCallThisCC(), llvm::SystemZFrameLowering::processFunctionBeforeFrameFinalized(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::AArch64FrameLowering::resolveFrameIndexReference(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::SIRegisterInfo::restoreSGPR(), shouldGuaranteeTCO(), and llvm::SIRegisterInfo::spillSGPR().

◆ getObjectSize()

int64_t llvm::MachineFrameInfo::getObjectSize ( int  ObjectIdx) const
inline

Return the size of the specified object.

Definition at line 408 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::addFrameReference(), llvm::AMDGPUTargetLowering::addTokenForArgument(), AdjustStackOffset(), llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), llvm::StatepointLoweringState::allocateStackSlot(), AssignProtectedObjSet(), CC_MipsO32_FP64(), computeFreeStackSlots(), llvm::MIRPrinter::convertStackObjects(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::ARCFrameLowering::emitEpilogue(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::ARCFrameLowering::emitPrologue(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getFrameIndexMMO(), getFrameIndexOperandNum(), llvm::R600FrameLowering::getFrameIndexReference(), llvm::MipsInstrInfo::GetMemOperand(), getStartOrEndSlot(), isConsecutiveLSLoc(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), MatchingStackOffset(), mayTailCallThisCC(), false::IntervalSorter::operator()(), llvm::X86FrameLowering::orderFrameObjects(), llvm::SystemZFrameLowering::processFunctionBeforeFrameFinalized(), llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::AVRFrameAnalyzer::runOnMachineFunction(), scavengeStackSlot(), shouldGuaranteeTCO(), spillIncomingStatepointValue(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::X86InstrInfo::storeRegToStackSlot(), and tryToElideArgumentCopy().

◆ getOffsetAdjustment()

int llvm::MachineFrameInfo::getOffsetAdjustment ( ) const
inline

◆ getPristineRegs()

BitVector MachineFrameInfo::getPristineRegs ( const MachineFunction MF) const

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.

Definition at line 109 of file MachineFrameInfo.cpp.

References getCalleeSavedInfo(), llvm::MachineRegisterInfo::getCalleeSavedRegs(), llvm::MCRegisterInfo::getNumRegs(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, isCalleeSavedInfoValid(), llvm::MCRegisterInfo::DiffListIterator::isValid(), and MRI.

Referenced by llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), matchPair(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().

◆ getRestorePoint()

MachineBasicBlock* llvm::MachineFrameInfo::getRestorePoint ( ) const
inline

◆ getSavePoint()

MachineBasicBlock* llvm::MachineFrameInfo::getSavePoint ( ) const
inline

◆ getStackID()

uint8_t llvm::MachineFrameInfo::getStackID ( int  ObjectIdx) const
inline
See also
StackID

Definition at line 628 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convertStackObjects(), and false::IntervalSorter::operator()().

◆ getStackProtectorIndex()

int llvm::MachineFrameInfo::getStackProtectorIndex ( ) const
inline

◆ getStackSize()

uint64_t llvm::MachineFrameInfo::getStackSize ( ) const
inline

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.

Definition at line 491 of file MachineFrameInfo.h.

Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::MIRPrinter::convert(), llvm::createXCoreFrameToArgsOffsetEliminationPass(), llvm::ARCFrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::LanaiRegisterInfo::eliminateFrameIndex(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AVRFrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::SparcFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::ARCFrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::MipsAsmPrinter::emitFrameDirective(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::getAllocatedStackSize(), getDwarfRegNum(), llvm::MipsSEFrameLowering::getFrameIndexReference(), llvm::SparcFrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::TargetFrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReferencePreferSP(), getOpenCLAlignment(), llvm::WebAssemblyFrameLowering::hasFP(), llvm::PPCFrameLowering::hasFP(), llvm::WebAssemblyFrameLowering::hasReservedCallFrame(), INITIALIZE_PASS(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::AArch64FrameLowering::resolveFrameIndexReference(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::HexagonPacketizerList::useCalleesSP(), and llvm::HexagonPacketizerList::useCallersSP().

◆ getUseLocalStackAllocationBlock()

bool llvm::MachineFrameInfo::getUseLocalStackAllocationBlock ( ) const
inline

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

Definition at line 389 of file MachineFrameInfo.h.

Referenced by AdjustStackOffset(), and AssignProtectedObjSet().

◆ hasCalls()

bool llvm::MachineFrameInfo::hasCalls ( ) const
inline

◆ hasCopyImplyingStackAdjustment()

bool llvm::MachineFrameInfo::hasCopyImplyingStackAdjustment ( ) const
inline

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

Definition at line 528 of file MachineFrameInfo.h.

Referenced by llvm::X86FrameLowering::emitPrologue(), and llvm::X86FrameLowering::hasFP().

◆ hasMustTailInVarArgFunc()

bool llvm::MachineFrameInfo::hasMustTailInVarArgFunc ( ) const
inline

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

Definition at line 540 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convert(), and isSortedByValueNo().

◆ hasOpaqueSPAdjustment()

bool llvm::MachineFrameInfo::hasOpaqueSPAdjustment ( ) const
inline

Returns true if the function contains opaque dynamic stack adjustments.

Definition at line 523 of file MachineFrameInfo.h.

Referenced by llvm::RegsForValue::AddInlineAsmOperands(), CantUseSP(), llvm::MIRPrinter::convert(), and llvm::X86FrameLowering::hasFP().

◆ hasPatchPoint()

bool llvm::MachineFrameInfo::hasPatchPoint ( ) const
inline

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

Definition at line 343 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convert(), llvm::WebAssemblyFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), INITIALIZE_PASS(), and llvm::PPCFrameLowering::needsFP().

◆ hasStackMap()

bool llvm::MachineFrameInfo::hasStackMap ( ) const
inline

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

Definition at line 337 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convert(), llvm::WebAssemblyFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), and llvm::PPCFrameLowering::needsFP().

◆ hasStackObjects()

bool llvm::MachineFrameInfo::hasStackObjects ( ) const
inline

◆ hasStackProtectorIndex()

bool llvm::MachineFrameInfo::hasStackProtectorIndex ( ) const
inline

◆ hasTailCall()

bool llvm::MachineFrameInfo::hasTailCall ( ) const
inline

Returns true if the function contains a tail call.

Definition at line 544 of file MachineFrameInfo.h.

Referenced by getUnderlyingObjectsForInstr(), and llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized().

◆ hasVarSizedObjects()

bool llvm::MachineFrameInfo::hasVarSizedObjects ( ) const
inline

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.

Definition at line 310 of file MachineFrameInfo.h.

Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), AdjustStackOffset(), AssignProtectedObjSet(), llvm::AArch64RegisterInfo::cannotEliminateFrame(), llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::ARMFrameLowering::canSimplifyCallFramePseudos(), CantUseSP(), llvm::PPCFrameLowering::determineFrameLayout(), doesIntrinsicReturnPredicate(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), estimateStackSize(), llvm::SystemZFrameLowering::getAllocatedStackSize(), llvm::IRTranslator::getAnalysisUsage(), getDwarfRegNum(), llvm::R600InstrInfo::getIndirectIndexEnd(), getLoadStoreOffsetAlign(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::LanaiRegisterInfo::hasBasePointer(), llvm::AArch64RegisterInfo::hasBasePointer(), llvm::ARMBaseRegisterInfo::hasBasePointer(), llvm::MipsFrameLowering::hasBP(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::WebAssemblyFrameLowering::hasFP(), llvm::SystemZFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::XCoreFrameLowering::hasFP(), llvm::ARCFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), llvm::AVRFrameLowering::hasReservedCallFrame(), llvm::SparcFrameLowering::hasReservedCallFrame(), llvm::Thumb1FrameLowering::hasReservedCallFrame(), llvm::Mips16FrameLowering::hasReservedCallFrame(), llvm::MipsSEFrameLowering::hasReservedCallFrame(), llvm::WebAssemblyFrameLowering::hasReservedCallFrame(), llvm::MSP430FrameLowering::hasReservedCallFrame(), llvm::ARMFrameLowering::hasReservedCallFrame(), llvm::AArch64FrameLowering::hasReservedCallFrame(), llvm::X86FrameLowering::hasReservedCallFrame(), llvm::SIFrameLowering::hasSP(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::HexagonFrameLowering::needsAligna(), llvm::PPCFrameLowering::needsFP(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized(), llvm::AArch64FrameLowering::resolveFrameIndexReference(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::HexagonInstrInfo::storeRegToStackSlot(), and llvm::AArch64RegisterInfo::useFPForScavengingIndex().

◆ hasVAStart()

bool llvm::MachineFrameInfo::hasVAStart ( ) const
inline

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

Definition at line 536 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convert(), isSortedByValueNo(), and LowerVASTART().

◆ isAliasedObjectIndex()

bool llvm::MachineFrameInfo::isAliasedObjectIndex ( int  ObjectIdx) const
inline

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

Definition at line 591 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::MIRPrinter::convertStackObjects(), and llvm::FixedStackPseudoSourceValue::isAliased().

◆ isCalleeSavedInfoValid()

bool llvm::MachineFrameInfo::isCalleeSavedInfoValid ( ) const
inline

◆ isDeadObjectIndex()

bool llvm::MachineFrameInfo::isDeadObjectIndex ( int  ObjectIdx) const
inline

◆ isFixedObjectIndex()

bool llvm::MachineFrameInfo::isFixedObjectIndex ( int  ObjectIdx) const
inline

◆ isFrameAddressTaken()

bool llvm::MachineFrameInfo::isFrameAddressTaken ( ) const
inline

◆ isImmutableObjectIndex()

bool llvm::MachineFrameInfo::isImmutableObjectIndex ( int  ObjectIdx) const
inline

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

Definition at line 598 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::MIRPrinter::convertStackObjects(), llvm::TargetInstrInfo::genAlternativeCodeSequence(), llvm::FixedStackPseudoSourceValue::isConstant(), and MatchingStackOffset().

◆ isMaxCallFrameSizeComputed()

bool llvm::MachineFrameInfo::isMaxCallFrameSizeComputed ( ) const
inline

◆ isObjectPreAllocated()

bool llvm::MachineFrameInfo::isObjectPreAllocated ( int  ObjectIdx) const
inline

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

Definition at line 401 of file MachineFrameInfo.h.

References assert().

Referenced by AdjustStackOffset(), AssignProtectedObjSet(), and lookupCandidateBaseReg().

◆ isObjectSExt()

bool llvm::MachineFrameInfo::isObjectSExt ( int  ObjectIdx) const
inline

Definition at line 466 of file MachineFrameInfo.h.

References assert().

Referenced by MatchingStackOffset().

◆ isObjectZExt()

bool llvm::MachineFrameInfo::isObjectZExt ( int  ObjectIdx) const
inline

Definition at line 454 of file MachineFrameInfo.h.

References assert().

Referenced by MatchingStackOffset().

◆ isReturnAddressTaken()

bool llvm::MachineFrameInfo::isReturnAddressTaken ( ) const
inline

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.

Definition at line 331 of file MachineFrameInfo.h.

Referenced by llvm::MIRPrinter::convert(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), and llvm::MipsSEFrameLowering::spillCalleeSavedRegisters().

◆ isSpillSlotObjectIndex()

bool llvm::MachineFrameInfo::isSpillSlotObjectIndex ( int  ObjectIdx) const
inline

◆ isStatepointSpillSlotObjectIndex()

bool llvm::MachineFrameInfo::isStatepointSpillSlotObjectIndex ( int  ObjectIdx) const
inline

Definition at line 621 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::TargetLoweringBase::emitPatchPoint().

◆ isVariableSizedObjectIndex()

bool llvm::MachineFrameInfo::isVariableSizedObjectIndex ( int  ObjectIdx) const
inline

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

Definition at line 648 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::MIRPrinter::convertStackObjects(), and scavengeStackSlot().

◆ mapLocalFrameObject()

void llvm::MachineFrameInfo::mapLocalFrameObject ( int  ObjectIndex,
int64_t  Offset 
)
inline

◆ markAsStatepointSpillSlotObjectIndex()

void llvm::MachineFrameInfo::markAsStatepointSpillSlotObjectIndex ( int  ObjectIdx)
inline

Definition at line 654 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::StatepointLoweringState::allocateStackSlot().

◆ print()

void MachineFrameInfo::print ( const MachineFunction MF,
raw_ostream OS 
) const

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

Implemented in MachineFunction.cpp.

Definition at line 205 of file MachineFrameInfo.cpp.

References llvm::TargetSubtargetInfo::getFrameLowering(), llvm::TargetFrameLowering::getOffsetOfLocalArea(), and llvm::MachineFunction::getSubtarget().

Referenced by dump(), and llvm::MachineFunction::print().

◆ RemoveStackObject()

void llvm::MachineFrameInfo::RemoveStackObject ( int  ObjectIdx)
inline

Remove or mark dead a statically sized stack object.

Definition at line 671 of file MachineFrameInfo.h.

Referenced by getStartOrEndSlot(), false::IntervalSorter::operator()(), llvm::SIMachineFunctionInfo::removeSGPRToVGPRFrameIndices(), and tryToElideArgumentCopy().

◆ setAdjustsStack()

void llvm::MachineFrameInfo::setAdjustsStack ( bool  V)
inline

◆ setCalleeSavedInfo()

void llvm::MachineFrameInfo::setCalleeSavedInfo ( const std::vector< CalleeSavedInfo > &  CSI)
inline

Used by prolog/epilog inserter to set the function's callee saved information.

Definition at line 690 of file MachineFrameInfo.h.

Referenced by assignCalleeSavedSpillSlots(), and llvm::MIRParserImpl::initializeFrameInfo().

◆ setCalleeSavedInfoValid()

void llvm::MachineFrameInfo::setCalleeSavedInfoValid ( bool  v)
inline

◆ setFrameAddressIsTaken()

void llvm::MachineFrameInfo::setFrameAddressIsTaken ( bool  T)
inline

◆ setFunctionContextIndex()

void llvm::MachineFrameInfo::setFunctionContextIndex ( int  I)
inline

Definition at line 320 of file MachineFrameInfo.h.

References I.

Referenced by getUnderlyingArgReg().

◆ setHasCalls()

void llvm::MachineFrameInfo::setHasCalls ( bool  V)
inline

◆ setHasCopyImplyingStackAdjustment()

void llvm::MachineFrameInfo::setHasCopyImplyingStackAdjustment ( bool  B)
inline

Definition at line 531 of file MachineFrameInfo.h.

References B.

Referenced by llvm::X86TargetLowering::finalizeLowering(), and LowerINTRINSIC_W_CHAIN().

◆ setHasMustTailInVarArgFunc()

void llvm::MachineFrameInfo::setHasMustTailInVarArgFunc ( bool  B)
inline

Definition at line 541 of file MachineFrameInfo.h.

References B.

Referenced by llvm::MIRParserImpl::initializeFrameInfo(), and llvm::FunctionLoweringInfo::set().

◆ setHasOpaqueSPAdjustment()

void llvm::MachineFrameInfo::setHasOpaqueSPAdjustment ( bool  B)
inline

Definition at line 524 of file MachineFrameInfo.h.

References B.

Referenced by llvm::MIRParserImpl::initializeFrameInfo(), and llvm::FunctionLoweringInfo::set().

◆ setHasPatchPoint()

void llvm::MachineFrameInfo::setHasPatchPoint ( bool  s = true)
inline

◆ setHasStackMap()

void llvm::MachineFrameInfo::setHasStackMap ( bool  s = true)
inline

◆ setHasTailCall()

void llvm::MachineFrameInfo::setHasTailCall ( )
inline

◆ setHasVAStart()

void llvm::MachineFrameInfo::setHasVAStart ( bool  B)
inline

Definition at line 537 of file MachineFrameInfo.h.

References B.

Referenced by llvm::MIRParserImpl::initializeFrameInfo(), and llvm::FunctionLoweringInfo::set().

◆ setIsImmutableObjectIndex()

void llvm::MachineFrameInfo::setIsImmutableObjectIndex ( int  ObjectIdx,
bool  Immutable 
)
inline

Marks the immutability of an object.

Definition at line 608 of file MachineFrameInfo.h.

References assert().

Referenced by tryToElideArgumentCopy().

◆ setLocalFrameMaxAlign()

void llvm::MachineFrameInfo::setLocalFrameMaxAlign ( unsigned  Align)
inline

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

Definition at line 382 of file MachineFrameInfo.h.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align.

Referenced by llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized().

◆ setLocalFrameSize()

void llvm::MachineFrameInfo::setLocalFrameSize ( int64_t  sz)
inline

Set the size of the local object blob.

Definition at line 375 of file MachineFrameInfo.h.

Referenced by llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized().

◆ setMaxCallFrameSize()

void llvm::MachineFrameInfo::setMaxCallFrameSize ( unsigned  S)
inline

◆ setObjectAlignment()

void llvm::MachineFrameInfo::setObjectAlignment ( int  ObjectIdx,
unsigned  Align 
)
inline

◆ setObjectOffset()

void llvm::MachineFrameInfo::setObjectOffset ( int  ObjectIdx,
int64_t  SPOffset 
)
inline

◆ setObjectSExt()

void llvm::MachineFrameInfo::setObjectSExt ( int  ObjectIdx,
bool  IsSExt 
)
inline

Definition at line 472 of file MachineFrameInfo.h.

References assert().

Referenced by shouldGuaranteeTCO().

◆ setObjectSize()

void llvm::MachineFrameInfo::setObjectSize ( int  ObjectIdx,
int64_t  Size 
)
inline

Change the size of the specified stack object.

Definition at line 415 of file MachineFrameInfo.h.

References assert(), and llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size.

Referenced by false::IntervalSorter::operator()().

◆ setObjectZExt()

void llvm::MachineFrameInfo::setObjectZExt ( int  ObjectIdx,
bool  IsZExt 
)
inline

Definition at line 460 of file MachineFrameInfo.h.

References assert().

Referenced by shouldGuaranteeTCO().

◆ setOffsetAdjustment()

void llvm::MachineFrameInfo::setOffsetAdjustment ( int  Adj)
inline

◆ setRestorePoint()

void llvm::MachineFrameInfo::setRestorePoint ( MachineBasicBlock NewRestore)
inline

Definition at line 702 of file MachineFrameInfo.h.

References llvm::dump().

Referenced by llvm::MIRParserImpl::initializeFrameInfo().

◆ setReturnAddressIsTaken()

void llvm::MachineFrameInfo::setReturnAddressIsTaken ( bool  s)
inline

◆ setSavePoint()

void llvm::MachineFrameInfo::setSavePoint ( MachineBasicBlock NewSave)
inline

◆ setStackID()

void llvm::MachineFrameInfo::setStackID ( int  ObjectIdx,
uint8_t  ID 
)
inline
See also
StackID

Definition at line 633 of file MachineFrameInfo.h.

References assert().

Referenced by llvm::MIRParserImpl::initializeFrameInfo().

◆ setStackProtectorIndex()

void llvm::MachineFrameInfo::setStackProtectorIndex ( int  I)
inline

Definition at line 314 of file MachineFrameInfo.h.

References I.

Referenced by getUnderlyingArgReg(), and llvm::MIRParserImpl::initializeFrameInfo().

◆ setStackSize()

void llvm::MachineFrameInfo::setStackSize ( uint64_t  Size)
inline

◆ setUseLocalStackAllocationBlock()

void llvm::MachineFrameInfo::setUseLocalStackAllocationBlock ( bool  v)
inline

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

Definition at line 396 of file MachineFrameInfo.h.

Referenced by llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized().


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