LLVM 24.0.0git
llvm::SIMachineFunctionInfo Class Referencefinal

This class keeps track of the SPI_SP_INPUT_ADDR config register, which tells the hardware which interpolation parameters to load. More...

#include "Target/AMDGPU/SIMachineFunctionInfo.h"

Inheritance diagram for llvm::SIMachineFunctionInfo:
[legend]

Classes

struct  VGPRSpillToAGPR

Public Member Functions

Register getVGPRForAGPRCopy () const
void setVGPRForAGPRCopy (Register NewVGPRForAGPRCopy)
bool isCalleeSavedReg (const MCPhysReg *CSRegs, MCPhysReg Reg) const
void setMaskForVGPRBlockOps (Register RegisterBlock, uint32_t Mask)
uint32_t getMaskForVGPRBlockOps (Register RegisterBlock) const
bool hasMaskForVGPRBlockOps (Register RegisterBlock) const
 SIMachineFunctionInfo (const SIMachineFunctionInfo &MFI)=default
 SIMachineFunctionInfo (const Function &F, const GCNSubtarget *STI)
MachineFunctionInfoclone (BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
 Make a functionally equivalent copy of this MachineFunctionInfo in MF.
bool initializeBaseYamlFields (const yaml::SIMachineFunctionInfo &YamlMFI, const MachineFunction &MF, PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange)
void reserveWWMRegister (Register Reg)
bool isWWMReg (Register Reg) const
void updatePerLaneVGPRMask (BitVector &RegMask)
BitVector getPerLaneVGPRMask () const
void clearPerLaneVGPRAllocMask ()
SIModeRegisterDefaults getMode () const
ArrayRef< SIRegisterInfo::SpilledReggetSGPRSpillToVirtualVGPRLanes (int FrameIndex) const
ArrayRef< RegistergetSGPRSpillVGPRs () const
ArrayRef< RegistergetSGPRSpillPhysVGPRs () const
const WWMSpillsMapgetWWMSpills () const
const ReservedRegSetgetWWMReservedRegs () const
bool isWWMReservedRegister (Register Reg) const
bool isWholeWaveFunction () const
ArrayRef< PrologEpilogSGPRSpill > getPrologEpilogSGPRSpills () const
GCNUserSGPRUsageInfogetUserSGPRInfo ()
const GCNUserSGPRUsageInfogetUserSGPRInfo () const
void addToPrologEpilogSGPRSpills (Register Reg, PrologEpilogSGPRSaveRestoreInfo SI)
bool hasPrologEpilogSGPRSpillEntry (Register Reg) const
Register getScratchSGPRCopyDstReg (Register Reg) const
void getAllScratchSGPRCopyDstRegs (SmallVectorImpl< Register > &Regs) const
bool checkIndexInPrologEpilogSGPRSpills (int FI) const
void removePrologEpilogSGPRSpillEntry (Register Reg)
const PrologEpilogSGPRSaveRestoreInfogetPrologEpilogSGPRSaveRestoreInfo (Register Reg) const
ArrayRef< SIRegisterInfo::SpilledReggetSGPRSpillToPhysicalVGPRLanes (int FrameIndex) const
void setFlag (Register Reg, uint8_t Flag)
bool checkFlag (Register Reg, uint8_t Flag) const
bool hasVRegFlags ()
void allocateWWMSpill (MachineFunction &MF, Register VGPR, uint64_t Size=4, Align Alignment=Align(4))
void splitWWMSpillRegisters (MachineFunction &MF, SmallVectorImpl< std::pair< Register, int > > &CalleeSavedRegs, SmallVectorImpl< std::pair< Register, int > > &ScratchRegs) const
ArrayRef< MCPhysReggetAGPRSpillVGPRs () const
Register getSGPRForEXECCopy () const
void setSGPRForEXECCopy (Register Reg)
ArrayRef< MCPhysReggetVGPRSpillAGPRs () const
MCPhysReg getVGPRToAGPRSpill (int FrameIndex, unsigned Lane) const
void setVGPRToAGPRSpillDead (int FrameIndex)
void shiftWwmVGPRsToLowestRange (MachineFunction &MF, SmallVectorImpl< Register > &WWMVGPRs, BitVector &SavedVGPRs)
bool allocateSGPRSpillToVGPRLane (MachineFunction &MF, int FI, bool SpillToPhysVGPRLane=false, bool IsPrologEpilog=false)
bool allocateVGPRSpillToAGPR (MachineFunction &MF, int FI, bool isAGPRtoVGPR)
 Reserve AGPRs or VGPRs to support spilling for FrameIndex FI.
bool removeDeadFrameIndices (MachineFrameInfo &MFI, bool ResetSGPRSpillStackIDs)
 If ResetSGPRSpillStackIDs is true, reset the stack ID from sgpr-spill to the default stack.
int getScavengeFI (MachineFrameInfo &MFI, const SIRegisterInfo &TRI)
std::optional< int > getOptionalScavengeFI () const
void setNoWWMPoolSGPRSpillFallback ()
bool hasNoWWMPoolSGPRSpillFallback () const
unsigned getBytesInStackArgArea () const
void setBytesInStackArgArea (unsigned Bytes)
bool isDynamicVGPREnabled () const
unsigned getDynamicVGPRBlockSize () const
unsigned getScratchReservedForDynamicVGPRs () const
void setScratchReservedForDynamicVGPRs (unsigned SizeInBytes)
Register addPrivateSegmentBuffer (const SIRegisterInfo &TRI)
Register addDispatchPtr (const SIRegisterInfo &TRI)
Register addQueuePtr (const SIRegisterInfo &TRI)
Register addKernargSegmentPtr (const SIRegisterInfo &TRI)
Register addDispatchID (const SIRegisterInfo &TRI)
Register addFlatScratchInit (const SIRegisterInfo &TRI)
Register addPrivateSegmentSize (const SIRegisterInfo &TRI)
Register addImplicitBufferPtr (const SIRegisterInfo &TRI)
Register addLDSKernelId ()
SmallVectorImpl< MCRegister > * addPreloadedKernArg (const SIRegisterInfo &TRI, const TargetRegisterClass *RC, unsigned AllocSizeDWord, int KernArgIdx, int PaddingSGPRs)
Register addReservedUserSGPR ()
 Increment user SGPRs used for padding the argument list only.
Register addWorkGroupIDX ()
Register addWorkGroupIDY ()
Register addWorkGroupIDZ ()
Register addWorkGroupInfo ()
bool hasLDSKernelId () const
void setWorkItemIDX (ArgDescriptor Arg)
void setWorkItemIDY (ArgDescriptor Arg)
void setWorkItemIDZ (ArgDescriptor Arg)
Register addPrivateSegmentWaveByteOffset ()
void setPrivateSegmentWaveByteOffset (Register Reg)
bool hasWorkGroupIDX () const
bool hasWorkGroupIDY () const
bool hasWorkGroupIDZ () const
bool hasWorkGroupInfo () const
bool hasPrivateSegmentWaveByteOffset () const
bool hasWorkItemIDX () const
bool hasWorkItemIDY () const
bool hasWorkItemIDZ () const
bool hasImplicitArgPtr () const
AMDGPUFunctionArgInfogetArgInfo ()
const AMDGPUFunctionArgInfogetArgInfo () const
std::tuple< const ArgDescriptor *, const TargetRegisterClass *, LLTgetPreloadedValue (AMDGPUFunctionArgInfo::PreloadedValue Value) const
MCRegister getPreloadedReg (AMDGPUFunctionArgInfo::PreloadedValue Value) const
unsigned getGITPtrHigh () const
Register getGITPtrLoReg (const MachineFunction &MF) const
uint32_t get32BitAddressHighBits () const
unsigned getNumUserSGPRs () const
unsigned getNumPreloadedSGPRs () const
unsigned getNumKernargPreloadedSGPRs () const
unsigned getNumWaveDispatchSGPRs () const
void setNumWaveDispatchSGPRs (unsigned Count)
unsigned getNumWaveDispatchVGPRs () const
void setNumWaveDispatchVGPRs (unsigned Count)
Register getPrivateSegmentWaveByteOffsetSystemSGPR () const
Register getScratchRSrcReg () const
 Returns the physical register reserved for use as the resource descriptor for scratch accesses.
void setScratchRSrcReg (Register Reg)
Register getFrameOffsetReg () const
void setFrameOffsetReg (Register Reg)
void setStackPtrOffsetReg (Register Reg)
void setLongBranchReservedReg (Register Reg)
Register getStackPtrOffsetReg () const
Register getLongBranchReservedReg () const
Register getQueuePtrUserSGPR () const
Register getImplicitBufferPtrUserSGPR () const
bool hasSpilledSGPRs () const
void setHasSpilledSGPRs (bool Spill=true)
bool hasSpilledVGPRs () const
void setHasSpilledVGPRs (bool Spill=true)
bool hasNonSpillStackObjects () const
void setHasNonSpillStackObjects (bool StackObject=true)
bool isStackRealigned () const
void setIsStackRealigned (bool Realigned=true)
unsigned getNumSpilledSGPRs () const
unsigned getNumSpilledVGPRs () const
void addToSpilledSGPRs (unsigned num)
void addToSpilledVGPRs (unsigned num)
unsigned getPSInputAddr () const
unsigned getPSInputEnable () const
bool isPSInputAllocated (unsigned Index) const
void markPSInputAllocated (unsigned Index)
void markPSInputEnabled (unsigned Index)
bool returnsVoid () const
void setIfReturnsVoid (bool Value)
std::pair< unsigned, unsignedgetFlatWorkGroupSizes () const
unsigned getMinFlatWorkGroupSize () const
unsigned getMaxFlatWorkGroupSize () const
std::pair< unsigned, unsignedgetWavesPerEU () const
unsigned getMinWavesPerEU () const
unsigned getMaxWavesPerEU () const
const AMDGPUGWSResourcePseudoSourceValuegetGWSPSV (const AMDGPUTargetMachine &TM)
unsigned getOccupancy () const
unsigned getMinAllowedOccupancy () const
void limitOccupancy (const MachineFunction &MF)
void limitOccupancy (unsigned Limit)
void increaseOccupancy (const MachineFunction &MF, unsigned Limit)
unsigned getMaxMemoryClusterDWords () const
unsigned getMinNumAGPRs () const
bool selectAGPRFormMFMA (unsigned NumRegs) const
 Return true if an MFMA that requires at least NumRegs should select to the AGPR form, instead of the VGPR form.
bool mayUseAGPRs (const Function &F) const
SmallVector< unsignedgetMaxNumWorkGroups () const
unsigned getMaxNumWorkGroupsX () const
unsigned getMaxNumWorkGroupsY () const
unsigned getMaxNumWorkGroupsZ () const
AMDGPU::ClusterDimsAttr getClusterDims () const
Public Member Functions inherited from llvm::AMDGPUMachineFunctionInfo
 AMDGPUMachineFunctionInfo (const Function &F, const AMDGPUSubtarget &ST)
uint64_t getExplicitKernArgSize () const
Align getMaxKernArgAlign () const
uint32_t getLDSSize () const
uint32_t getGDSSize () const
void recordNumNamedBarriers (uint32_t GVAddr, unsigned BarCnt)
uint32_t getNumNamedBarriers () const
bool isEntryFunction () const
bool isModuleEntryFunction () const
bool isChainFunction () const
bool isBottomOfStack () const
bool isMemoryBound () const
bool needsWaveLimiter () const
bool hasInitWholeWave () const
void setInitWholeWave ()
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV)
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV, Align Trailing)
Align getDynLDSAlign () const
void setDynLDSAlign (const Function &F, const GlobalVariable &GV)
void setUsesDynamicLDS (bool DynLDS)
bool isDynamicLDSUsed () const
Public Member Functions inherited from llvm::MachineFunctionInfo
virtual ~MachineFunctionInfo ()

Static Public Attributes

static bool MFMAVGPRForm = false

Friends

class GCNTargetMachine

Additional Inherited Members

Static Public Member Functions inherited from llvm::AMDGPUMachineFunctionInfo
static std::optional< uint32_tgetLDSKernelIdMetadata (const Function &F)
static std::optional< uint32_tgetLDSAbsoluteAddress (const GlobalValue &GV)
Static Public Member Functions inherited from llvm::MachineFunctionInfo
template<typename FuncInfoTy, typename SubtargetTy = TargetSubtargetInfo>
static FuncInfoTy * create (BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
 Factory function: default behavior is to call new using the supplied allocator.
template<typename Ty>
static Ty * create (BumpPtrAllocator &Allocator, const Ty &MFI)
Protected Attributes inherited from llvm::AMDGPUMachineFunctionInfo
uint64_t ExplicitKernArgSize = 0
Align MaxKernArgAlign
uint32_t LDSSize = 0
 Number of bytes in the LDS that are being used.
uint32_t GDSSize = 0
uint32_t StaticLDSSize = 0
 Number of bytes in the LDS allocated statically.
uint32_t StaticGDSSize = 0
Align DynLDSAlign
 Align for dynamic shared memory if any.
bool UsesDynamicLDS = false
uint32_t NumNamedBarriers = 0
bool IsEntryFunction = false
bool IsModuleEntryFunction = false
bool IsChainFunction = false
bool MemoryBound = false
bool WaveLimiter = false
bool HasInitWholeWave = false

Detailed Description

This class keeps track of the SPI_SP_INPUT_ADDR config register, which tells the hardware which interpolation parameters to load.

Definition at line 421 of file SIMachineFunctionInfo.h.

Constructor & Destructor Documentation

◆ SIMachineFunctionInfo() [1/2]

llvm::SIMachineFunctionInfo::SIMachineFunctionInfo ( const SIMachineFunctionInfo & MFI)
default

References Allocator, F, and SIMachineFunctionInfo().

Referenced by clone(), and SIMachineFunctionInfo().

◆ SIMachineFunctionInfo() [2/2]

Member Function Documentation

◆ addDispatchID()

Register SIMachineFunctionInfo::addDispatchID ( const SIRegisterInfo & TRI)

Definition at line 241 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addDispatchPtr()

Register SIMachineFunctionInfo::addDispatchPtr ( const SIRegisterInfo & TRI)

Definition at line 219 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addFlatScratchInit()

Register SIMachineFunctionInfo::addFlatScratchInit ( const SIRegisterInfo & TRI)

Definition at line 248 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addImplicitBufferPtr()

Register SIMachineFunctionInfo::addImplicitBufferPtr ( const SIRegisterInfo & TRI)

Definition at line 261 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addKernargSegmentPtr()

Register SIMachineFunctionInfo::addKernargSegmentPtr ( const SIRegisterInfo & TRI)

Definition at line 233 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addLDSKernelId()

Register SIMachineFunctionInfo::addLDSKernelId ( )

Definition at line 268 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister().

◆ addPreloadedKernArg()

SmallVectorImpl< MCRegister > * SIMachineFunctionInfo::addPreloadedKernArg ( const SIRegisterInfo & TRI,
const TargetRegisterClass * RC,
unsigned AllocSizeDWord,
int KernArgIdx,
int PaddingSGPRs )

Definition at line 274 of file SIMachineFunctionInfo.cpp.

References assert(), I, and TRI.

◆ addPrivateSegmentBuffer()

Register SIMachineFunctionInfo::addPrivateSegmentBuffer ( const SIRegisterInfo & TRI)

Definition at line 210 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addPrivateSegmentSize()

Register SIMachineFunctionInfo::addPrivateSegmentSize ( const SIRegisterInfo & TRI)

Definition at line 255 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addPrivateSegmentWaveByteOffset()

Register llvm::SIMachineFunctionInfo::addPrivateSegmentWaveByteOffset ( )
inline

Definition at line 951 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister().

◆ addQueuePtr()

Register SIMachineFunctionInfo::addQueuePtr ( const SIRegisterInfo & TRI)

Definition at line 226 of file SIMachineFunctionInfo.cpp.

References llvm::ArgDescriptor::createRegister(), and TRI.

◆ addReservedUserSGPR()

Register llvm::SIMachineFunctionInfo::addReservedUserSGPR ( )
inline

Increment user SGPRs used for padding the argument list only.

Definition at line 905 of file SIMachineFunctionInfo.h.

References llvm::Next.

◆ addToPrologEpilogSGPRSpills()

void llvm::SIMachineFunctionInfo::addToPrologEpilogSGPRSpills ( Register Reg,
PrologEpilogSGPRSaveRestoreInfo SI )
inline

◆ addToSpilledSGPRs()

void llvm::SIMachineFunctionInfo::addToSpilledSGPRs ( unsigned num)
inline

◆ addToSpilledVGPRs()

void llvm::SIMachineFunctionInfo::addToSpilledVGPRs ( unsigned num)
inline

◆ addWorkGroupIDX()

Register llvm::SIMachineFunctionInfo::addWorkGroupIDX ( )
inline

Definition at line 912 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister().

◆ addWorkGroupIDY()

Register llvm::SIMachineFunctionInfo::addWorkGroupIDY ( )
inline

Definition at line 918 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister().

◆ addWorkGroupIDZ()

Register llvm::SIMachineFunctionInfo::addWorkGroupIDZ ( )
inline

Definition at line 924 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister().

◆ addWorkGroupInfo()

Register llvm::SIMachineFunctionInfo::addWorkGroupInfo ( )
inline

Definition at line 930 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister().

◆ allocateSGPRSpillToVGPRLane()

bool SIMachineFunctionInfo::allocateSGPRSpillToVGPRLane ( MachineFunction & MF,
int FI,
bool SpillToPhysVGPRLane = false,
bool IsPrologEpilog = false )

◆ allocateVGPRSpillToAGPR()

◆ allocateWWMSpill()

◆ checkFlag()

◆ checkIndexInPrologEpilogSGPRSpills()

bool llvm::SIMachineFunctionInfo::checkIndexInPrologEpilogSGPRSpills ( int FI) const
inline

◆ clearPerLaneVGPRAllocMask()

void llvm::SIMachineFunctionInfo::clearPerLaneVGPRAllocMask ( )
inline

Definition at line 684 of file SIMachineFunctionInfo.h.

◆ clone()

MachineFunctionInfo * SIMachineFunctionInfo::clone ( BumpPtrAllocator & Allocator,
MachineFunction & DestMF,
const DenseMap< MachineBasicBlock *, MachineBasicBlock * > & Src2DstMBB ) const
overridevirtual

Make a functionally equivalent copy of this MachineFunctionInfo in MF.

This requires remapping MachineBasicBlock references from the original parent to values in the new function. Targets may assume that virtual register and frame index values are preserved in the new function.

Reimplemented from llvm::MachineFunctionInfo.

Definition at line 197 of file SIMachineFunctionInfo.cpp.

References llvm::MachineFunction::cloneInfo(), and SIMachineFunctionInfo().

◆ get32BitAddressHighBits()

uint32_t llvm::SIMachineFunctionInfo::get32BitAddressHighBits ( ) const
inline

Definition at line 1022 of file SIMachineFunctionInfo.h.

◆ getAGPRSpillVGPRs()

ArrayRef< MCPhysReg > llvm::SIMachineFunctionInfo::getAGPRSpillVGPRs ( ) const
inline

◆ getAllScratchSGPRCopyDstRegs()

void llvm::SIMachineFunctionInfo::getAllScratchSGPRCopyDstRegs ( SmallVectorImpl< Register > & Regs) const
inline

◆ getArgInfo() [1/2]

AMDGPUFunctionArgInfo & llvm::SIMachineFunctionInfo::getArgInfo ( )
inline

◆ getArgInfo() [2/2]

const AMDGPUFunctionArgInfo & llvm::SIMachineFunctionInfo::getArgInfo ( ) const
inline

Definition at line 1002 of file SIMachineFunctionInfo.h.

◆ getBytesInStackArgArea()

unsigned llvm::SIMachineFunctionInfo::getBytesInStackArgArea ( ) const
inline

◆ getClusterDims()

◆ getDynamicVGPRBlockSize()

◆ getFlatWorkGroupSizes()

std::pair< unsigned, unsigned > llvm::SIMachineFunctionInfo::getFlatWorkGroupSizes ( ) const
inline
Returns
A pair of default/requested minimum/maximum flat work group sizes for this function.

Definition at line 1175 of file SIMachineFunctionInfo.h.

◆ getFrameOffsetReg()

◆ getGITPtrHigh()

unsigned llvm::SIMachineFunctionInfo::getGITPtrHigh ( ) const
inline

Definition at line 1016 of file SIMachineFunctionInfo.h.

Referenced by buildGitPtr().

◆ getGITPtrLoReg()

◆ getGWSPSV()

◆ getImplicitBufferPtrUserSGPR()

Register llvm::SIMachineFunctionInfo::getImplicitBufferPtrUserSGPR ( ) const
inline

Definition at line 1093 of file SIMachineFunctionInfo.h.

◆ getLongBranchReservedReg()

◆ getMaskForVGPRBlockOps()

◆ getMaxFlatWorkGroupSize()

unsigned llvm::SIMachineFunctionInfo::getMaxFlatWorkGroupSize ( ) const
inline
Returns
Default/requested maximum flat work group size for this function.

Definition at line 1185 of file SIMachineFunctionInfo.h.

◆ getMaxMemoryClusterDWords()

unsigned llvm::SIMachineFunctionInfo::getMaxMemoryClusterDWords ( ) const
inline

Definition at line 1233 of file SIMachineFunctionInfo.h.

Referenced by llvm::SIInstrInfo::shouldClusterMemOps().

◆ getMaxNumWorkGroups()

SmallVector< unsigned > llvm::SIMachineFunctionInfo::getMaxNumWorkGroups ( ) const
inline
Returns
Default/requested number of work groups for this function.

Definition at line 1248 of file SIMachineFunctionInfo.h.

◆ getMaxNumWorkGroupsX()

unsigned llvm::SIMachineFunctionInfo::getMaxNumWorkGroupsX ( ) const
inline

Definition at line 1250 of file SIMachineFunctionInfo.h.

◆ getMaxNumWorkGroupsY()

unsigned llvm::SIMachineFunctionInfo::getMaxNumWorkGroupsY ( ) const
inline

Definition at line 1251 of file SIMachineFunctionInfo.h.

◆ getMaxNumWorkGroupsZ()

unsigned llvm::SIMachineFunctionInfo::getMaxNumWorkGroupsZ ( ) const
inline

Definition at line 1252 of file SIMachineFunctionInfo.h.

◆ getMaxWavesPerEU()

unsigned llvm::SIMachineFunctionInfo::getMaxWavesPerEU ( ) const
inline
Returns
Default/requested maximum number of waves per execution unit.

Definition at line 1201 of file SIMachineFunctionInfo.h.

Referenced by limitOccupancy().

◆ getMinAllowedOccupancy()

unsigned llvm::SIMachineFunctionInfo::getMinAllowedOccupancy ( ) const
inline

◆ getMinFlatWorkGroupSize()

unsigned llvm::SIMachineFunctionInfo::getMinFlatWorkGroupSize ( ) const
inline
Returns
Default/requested minimum flat work group size for this function.

Definition at line 1180 of file SIMachineFunctionInfo.h.

◆ getMinNumAGPRs()

unsigned llvm::SIMachineFunctionInfo::getMinNumAGPRs ( ) const
inline

Definition at line 1235 of file SIMachineFunctionInfo.h.

Referenced by selectAGPRFormMFMA().

◆ getMinWavesPerEU()

unsigned llvm::SIMachineFunctionInfo::getMinWavesPerEU ( ) const
inline
Returns
Default/requested minimum number of waves per execution unit.

Definition at line 1196 of file SIMachineFunctionInfo.h.

◆ getMode()

◆ getNumKernargPreloadedSGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumKernargPreloadedSGPRs ( ) const
inline

Definition at line 1034 of file SIMachineFunctionInfo.h.

◆ getNumPreloadedSGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumPreloadedSGPRs ( ) const
inline

◆ getNumSpilledSGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumSpilledSGPRs ( ) const
inline

Definition at line 1129 of file SIMachineFunctionInfo.h.

◆ getNumSpilledVGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumSpilledVGPRs ( ) const
inline

Definition at line 1133 of file SIMachineFunctionInfo.h.

◆ getNumUserSGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumUserSGPRs ( ) const
inline

Definition at line 1026 of file SIMachineFunctionInfo.h.

◆ getNumWaveDispatchSGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumWaveDispatchSGPRs ( ) const
inline

Definition at line 1038 of file SIMachineFunctionInfo.h.

◆ getNumWaveDispatchVGPRs()

unsigned llvm::SIMachineFunctionInfo::getNumWaveDispatchVGPRs ( ) const
inline

Definition at line 1042 of file SIMachineFunctionInfo.h.

◆ getOccupancy()

unsigned llvm::SIMachineFunctionInfo::getOccupancy ( ) const
inline

Definition at line 1210 of file SIMachineFunctionInfo.h.

Referenced by llvm::GCNSchedStrategy::initialize().

◆ getOptionalScavengeFI()

std::optional< int > llvm::SIMachineFunctionInfo::getOptionalScavengeFI ( ) const
inline

◆ getPerLaneVGPRMask()

BitVector llvm::SIMachineFunctionInfo::getPerLaneVGPRMask ( ) const
inline

Definition at line 683 of file SIMachineFunctionInfo.h.

Referenced by llvm::SIRegisterInfo::getReservedRegs().

◆ getPreloadedReg()

◆ getPreloadedValue()

std::tuple< const ArgDescriptor *, const TargetRegisterClass *, LLT > llvm::SIMachineFunctionInfo::getPreloadedValue ( AMDGPUFunctionArgInfo::PreloadedValue Value) const
inline

◆ getPrivateSegmentWaveByteOffsetSystemSGPR()

Register llvm::SIMachineFunctionInfo::getPrivateSegmentWaveByteOffsetSystemSGPR ( ) const
inline

Definition at line 1046 of file SIMachineFunctionInfo.h.

◆ getPrologEpilogSGPRSaveRestoreInfo()

const PrologEpilogSGPRSaveRestoreInfo & llvm::SIMachineFunctionInfo::getPrologEpilogSGPRSaveRestoreInfo ( Register Reg) const
inline

Definition at line 781 of file SIMachineFunctionInfo.h.

References assert(), llvm::find_if(), I, and Reg.

Referenced by llvm::SIFrameLowering::emitPrologue().

◆ getPrologEpilogSGPRSpills()

ArrayRef< PrologEpilogSGPRSpill > llvm::SIMachineFunctionInfo::getPrologEpilogSGPRSpills ( ) const
inline

◆ getPSInputAddr()

unsigned llvm::SIMachineFunctionInfo::getPSInputAddr ( ) const
inline

Definition at line 1145 of file SIMachineFunctionInfo.h.

◆ getPSInputEnable()

unsigned llvm::SIMachineFunctionInfo::getPSInputEnable ( ) const
inline

Definition at line 1149 of file SIMachineFunctionInfo.h.

◆ getQueuePtrUserSGPR()

Register llvm::SIMachineFunctionInfo::getQueuePtrUserSGPR ( ) const
inline

Definition at line 1089 of file SIMachineFunctionInfo.h.

◆ getScavengeFI()

int SIMachineFunctionInfo::getScavengeFI ( MachineFrameInfo & MFI,
const SIRegisterInfo & TRI )

◆ getScratchReservedForDynamicVGPRs()

unsigned llvm::SIMachineFunctionInfo::getScratchReservedForDynamicVGPRs ( ) const
inline

Definition at line 881 of file SIMachineFunctionInfo.h.

Referenced by llvm::SIInstrInfo::expandPostRAPseudo().

◆ getScratchRSrcReg()

Register llvm::SIMachineFunctionInfo::getScratchRSrcReg ( ) const
inline

◆ getScratchSGPRCopyDstReg()

Register llvm::SIMachineFunctionInfo::getScratchSGPRCopyDstReg ( Register Reg) const
inline

◆ getSGPRForEXECCopy()

◆ getSGPRSpillPhysVGPRs()

ArrayRef< Register > llvm::SIMachineFunctionInfo::getSGPRSpillPhysVGPRs ( ) const
inline

◆ getSGPRSpillToPhysicalVGPRLanes()

ArrayRef< SIRegisterInfo::SpilledReg > llvm::SIMachineFunctionInfo::getSGPRSpillToPhysicalVGPRLanes ( int FrameIndex) const
inline

◆ getSGPRSpillToVirtualVGPRLanes()

ArrayRef< SIRegisterInfo::SpilledReg > llvm::SIMachineFunctionInfo::getSGPRSpillToVirtualVGPRLanes ( int FrameIndex) const
inline

◆ getSGPRSpillVGPRs()

ArrayRef< Register > llvm::SIMachineFunctionInfo::getSGPRSpillVGPRs ( ) const
inline

Definition at line 696 of file SIMachineFunctionInfo.h.

◆ getStackPtrOffsetReg()

◆ getUserSGPRInfo() [1/2]

◆ getUserSGPRInfo() [2/2]

const GCNUserSGPRUsageInfo & llvm::SIMachineFunctionInfo::getUserSGPRInfo ( ) const
inline

Definition at line 715 of file SIMachineFunctionInfo.h.

◆ getVGPRForAGPRCopy()

◆ getVGPRSpillAGPRs()

ArrayRef< MCPhysReg > llvm::SIMachineFunctionInfo::getVGPRSpillAGPRs ( ) const
inline

◆ getVGPRToAGPRSpill()

MCPhysReg llvm::SIMachineFunctionInfo::getVGPRToAGPRSpill ( int FrameIndex,
unsigned Lane ) const
inline

Definition at line 833 of file SIMachineFunctionInfo.h.

References I.

Referenced by spillVGPRtoAGPR().

◆ getWavesPerEU()

std::pair< unsigned, unsigned > llvm::SIMachineFunctionInfo::getWavesPerEU ( ) const
inline
Returns
A pair of default/requested minimum/maximum number of waves per execution unit.

Definition at line 1191 of file SIMachineFunctionInfo.h.

Referenced by llvm::GCNSubtarget::getMaxNumSGPRs().

◆ getWWMReservedRegs()

◆ getWWMSpills()

const WWMSpillsMap & llvm::SIMachineFunctionInfo::getWWMSpills ( ) const
inline

◆ hasImplicitArgPtr()

bool llvm::SIMachineFunctionInfo::hasImplicitArgPtr ( ) const
inline

Definition at line 994 of file SIMachineFunctionInfo.h.

◆ hasLDSKernelId()

bool llvm::SIMachineFunctionInfo::hasLDSKernelId ( ) const
inline

Definition at line 936 of file SIMachineFunctionInfo.h.

◆ hasMaskForVGPRBlockOps()

bool llvm::SIMachineFunctionInfo::hasMaskForVGPRBlockOps ( Register RegisterBlock) const
inline

◆ hasNonSpillStackObjects()

bool llvm::SIMachineFunctionInfo::hasNonSpillStackObjects ( ) const
inline

Definition at line 1113 of file SIMachineFunctionInfo.h.

◆ hasNoWWMPoolSGPRSpillFallback()

bool llvm::SIMachineFunctionInfo::hasNoWWMPoolSGPRSpillFallback ( ) const
inline

◆ hasPrivateSegmentWaveByteOffset()

bool llvm::SIMachineFunctionInfo::hasPrivateSegmentWaveByteOffset ( ) const
inline

Definition at line 978 of file SIMachineFunctionInfo.h.

◆ hasPrologEpilogSGPRSpillEntry()

bool llvm::SIMachineFunctionInfo::hasPrologEpilogSGPRSpillEntry ( Register Reg) const
inline

◆ hasSpilledSGPRs()

bool llvm::SIMachineFunctionInfo::hasSpilledSGPRs ( ) const
inline

◆ hasSpilledVGPRs()

bool llvm::SIMachineFunctionInfo::hasSpilledVGPRs ( ) const
inline

◆ hasVRegFlags()

bool llvm::SIMachineFunctionInfo::hasVRegFlags ( )
inline

Definition at line 811 of file SIMachineFunctionInfo.h.

◆ hasWorkGroupIDX()

bool llvm::SIMachineFunctionInfo::hasWorkGroupIDX ( ) const
inline

Definition at line 962 of file SIMachineFunctionInfo.h.

◆ hasWorkGroupIDY()

bool llvm::SIMachineFunctionInfo::hasWorkGroupIDY ( ) const
inline

Definition at line 966 of file SIMachineFunctionInfo.h.

◆ hasWorkGroupIDZ()

bool llvm::SIMachineFunctionInfo::hasWorkGroupIDZ ( ) const
inline

Definition at line 970 of file SIMachineFunctionInfo.h.

Referenced by llvm::AMDGPULegalizerInfo::loadInputValue().

◆ hasWorkGroupInfo()

bool llvm::SIMachineFunctionInfo::hasWorkGroupInfo ( ) const
inline

Definition at line 974 of file SIMachineFunctionInfo.h.

◆ hasWorkItemIDX()

bool llvm::SIMachineFunctionInfo::hasWorkItemIDX ( ) const
inline

Definition at line 982 of file SIMachineFunctionInfo.h.

◆ hasWorkItemIDY()

bool llvm::SIMachineFunctionInfo::hasWorkItemIDY ( ) const
inline

Definition at line 986 of file SIMachineFunctionInfo.h.

◆ hasWorkItemIDZ()

bool llvm::SIMachineFunctionInfo::hasWorkItemIDZ ( ) const
inline

Definition at line 990 of file SIMachineFunctionInfo.h.

◆ increaseOccupancy()

void llvm::SIMachineFunctionInfo::increaseOccupancy ( const MachineFunction & MF,
unsigned Limit )
inline

Definition at line 1227 of file SIMachineFunctionInfo.h.

References limitOccupancy().

◆ initializeBaseYamlFields()

bool SIMachineFunctionInfo::initializeBaseYamlFields ( const yaml::SIMachineFunctionInfo & YamlMFI,
const MachineFunction & MF,
PerFunctionMIParsingState & PFS,
SMDiagnostic & Error,
SMRange & SourceRange )

Definition at line 784 of file SIMachineFunctionInfo.cpp.

References llvm::yaml::SIMachineFunctionInfo::BytesInStackArgArea, llvm::SourceMgr::DK_Error, llvm::yaml::SIMachineFunctionInfo::DynamicVGPRBlockSize, llvm::AMDGPUMachineFunctionInfo::DynLDSAlign, llvm::yaml::SIMachineFunctionInfo::DynLDSAlign, llvm::AMDGPUMachineFunctionInfo::ExplicitKernArgSize, llvm::yaml::SIMachineFunctionInfo::ExplicitKernArgSize, llvm::AMDGPUMachineFunctionInfo::GDSSize, llvm::yaml::SIMachineFunctionInfo::GDSSize, llvm::MemoryBuffer::getBufferIdentifier(), llvm::MachineFunction::getFrameInfo(), llvm::SourceMgr::getMainFileID(), llvm::SourceMgr::getMemoryBuffer(), llvm::yaml::SIMachineFunctionInfo::HasNoWWMPoolSGPRSpillFallback, llvm::yaml::SIMachineFunctionInfo::HasSpilledSGPRs, llvm::yaml::SIMachineFunctionInfo::HasSpilledVGPRs, llvm::yaml::SIMachineFunctionInfo::HighBitsOf32BitAddress, llvm::AMDGPUMachineFunctionInfo::IsEntryFunction, llvm::yaml::SIMachineFunctionInfo::IsEntryFunction, llvm::yaml::SIMachineFunctionInfo::IsWholeWaveFunction, llvm::AMDGPUMachineFunctionInfo::LDSSize, llvm::yaml::SIMachineFunctionInfo::LDSSize, llvm::AMDGPUMachineFunctionInfo::MaxKernArgAlign, llvm::yaml::SIMachineFunctionInfo::MaxKernArgAlign, llvm::yaml::SIMachineFunctionInfo::MaxMemoryClusterDWords, llvm::AMDGPUMachineFunctionInfo::MemoryBound, llvm::yaml::SIMachineFunctionInfo::MemoryBound, llvm::yaml::SIMachineFunctionInfo::MinNumAGPRs, llvm::yaml::SIMachineFunctionInfo::NumKernargPreloadSGPRs, llvm::yaml::SIMachineFunctionInfo::NumWaveDispatchSGPRs, llvm::yaml::SIMachineFunctionInfo::NumWaveDispatchVGPRs, llvm::yaml::SIMachineFunctionInfo::Occupancy, llvm::yaml::SIMachineFunctionInfo::PSInputAddr, llvm::yaml::SIMachineFunctionInfo::PSInputEnable, llvm::yaml::SIMachineFunctionInfo::ReturnsVoid, llvm::yaml::SIMachineFunctionInfo::ScavengeFI, llvm::PerFunctionMIParsingState::SM, llvm::toString(), llvm::AMDGPUMachineFunctionInfo::WaveLimiter, and llvm::yaml::SIMachineFunctionInfo::WaveLimiter.

Referenced by llvm::GCNTargetMachine::parseMachineFunctionInfo().

◆ isCalleeSavedReg()

bool SIMachineFunctionInfo::isCalleeSavedReg ( const MCPhysReg * CSRegs,
MCPhysReg Reg ) const

Definition at line 343 of file SIMachineFunctionInfo.cpp.

References I.

Referenced by splitWWMSpillRegisters().

◆ isDynamicVGPREnabled()

bool llvm::SIMachineFunctionInfo::isDynamicVGPREnabled ( ) const
inline

Definition at line 877 of file SIMachineFunctionInfo.h.

◆ isPSInputAllocated()

bool llvm::SIMachineFunctionInfo::isPSInputAllocated ( unsigned Index) const
inline

Definition at line 1153 of file SIMachineFunctionInfo.h.

◆ isStackRealigned()

bool llvm::SIMachineFunctionInfo::isStackRealigned ( ) const
inline

◆ isWholeWaveFunction()

◆ isWWMReg()

bool llvm::SIMachineFunctionInfo::isWWMReg ( Register Reg) const
inline

◆ isWWMReservedRegister()

bool llvm::SIMachineFunctionInfo::isWWMReservedRegister ( Register Reg) const
inline

Definition at line 702 of file SIMachineFunctionInfo.h.

References Reg.

Referenced by assignSlotsUsingVGPRBlocks().

◆ limitOccupancy() [1/2]

void SIMachineFunctionInfo::limitOccupancy ( const MachineFunction & MF)

◆ limitOccupancy() [2/2]

void llvm::SIMachineFunctionInfo::limitOccupancy ( unsigned Limit)
inline

Definition at line 1222 of file SIMachineFunctionInfo.h.

◆ markPSInputAllocated()

void llvm::SIMachineFunctionInfo::markPSInputAllocated ( unsigned Index)
inline

Definition at line 1157 of file SIMachineFunctionInfo.h.

◆ markPSInputEnabled()

void llvm::SIMachineFunctionInfo::markPSInputEnabled ( unsigned Index)
inline

Definition at line 1161 of file SIMachineFunctionInfo.h.

◆ mayUseAGPRs()

bool SIMachineFunctionInfo::mayUseAGPRs ( const Function & F) const

Definition at line 836 of file SIMachineFunctionInfo.cpp.

References F, and llvm::AMDGPU::getIntegerPairAttribute().

◆ removeDeadFrameIndices()

◆ removePrologEpilogSGPRSpillEntry()

void llvm::SIMachineFunctionInfo::removePrologEpilogSGPRSpillEntry ( Register Reg)
inline

Definition at line 771 of file SIMachineFunctionInfo.h.

References llvm::find_if(), I, and Reg.

Referenced by llvm::SIFrameLowering::emitCSRSpillStores().

◆ reserveWWMRegister()

void llvm::SIMachineFunctionInfo::reserveWWMRegister ( Register Reg)
inline

◆ returnsVoid()

bool llvm::SIMachineFunctionInfo::returnsVoid ( ) const
inline

Definition at line 1165 of file SIMachineFunctionInfo.h.

Referenced by llvm::AMDGPUCallLowering::lowerReturn().

◆ selectAGPRFormMFMA()

bool llvm::SIMachineFunctionInfo::selectAGPRFormMFMA ( unsigned NumRegs) const
inline

Return true if an MFMA that requires at least NumRegs should select to the AGPR form, instead of the VGPR form.

Definition at line 1239 of file SIMachineFunctionInfo.h.

References getMinNumAGPRs(), and MFMAVGPRForm.

Referenced by llvm::AMDGPURegisterBankInfo::getInstrMapping().

◆ setBytesInStackArgArea()

void llvm::SIMachineFunctionInfo::setBytesInStackArgArea ( unsigned Bytes)
inline

Definition at line 873 of file SIMachineFunctionInfo.h.

◆ setFlag()

void llvm::SIMachineFunctionInfo::setFlag ( Register Reg,
uint8_t Flag )
inline

Definition at line 798 of file SIMachineFunctionInfo.h.

References assert(), and Reg.

Referenced by llvm::GCNTargetMachine::parseMachineFunctionInfo().

◆ setFrameOffsetReg()

void llvm::SIMachineFunctionInfo::setFrameOffsetReg ( Register Reg)
inline

Definition at line 1067 of file SIMachineFunctionInfo.h.

References assert(), and Reg.

◆ setHasNonSpillStackObjects()

void llvm::SIMachineFunctionInfo::setHasNonSpillStackObjects ( bool StackObject = true)
inline

Definition at line 1117 of file SIMachineFunctionInfo.h.

◆ setHasSpilledSGPRs()

void llvm::SIMachineFunctionInfo::setHasSpilledSGPRs ( bool Spill = true)
inline

Definition at line 1101 of file SIMachineFunctionInfo.h.

Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().

◆ setHasSpilledVGPRs()

void llvm::SIMachineFunctionInfo::setHasSpilledVGPRs ( bool Spill = true)
inline

◆ setIfReturnsVoid()

void llvm::SIMachineFunctionInfo::setIfReturnsVoid ( bool Value)
inline

Definition at line 1169 of file SIMachineFunctionInfo.h.

Referenced by llvm::AMDGPUCallLowering::lowerReturn().

◆ setIsStackRealigned()

void llvm::SIMachineFunctionInfo::setIsStackRealigned ( bool Realigned = true)
inline

Definition at line 1125 of file SIMachineFunctionInfo.h.

Referenced by llvm::SIFrameLowering::emitPrologue().

◆ setLongBranchReservedReg()

void llvm::SIMachineFunctionInfo::setLongBranchReservedReg ( Register Reg)
inline

◆ setMaskForVGPRBlockOps()

void llvm::SIMachineFunctionInfo::setMaskForVGPRBlockOps ( Register RegisterBlock,
uint32_t Mask )
inline

Definition at line 649 of file SIMachineFunctionInfo.h.

Referenced by assignSlotsUsingVGPRBlocks().

◆ setNoWWMPoolSGPRSpillFallback()

void llvm::SIMachineFunctionInfo::setNoWWMPoolSGPRSpillFallback ( )
inline

Definition at line 864 of file SIMachineFunctionInfo.h.

◆ setNumWaveDispatchSGPRs()

void llvm::SIMachineFunctionInfo::setNumWaveDispatchSGPRs ( unsigned Count)
inline

Definition at line 1040 of file SIMachineFunctionInfo.h.

References llvm::Count.

◆ setNumWaveDispatchVGPRs()

void llvm::SIMachineFunctionInfo::setNumWaveDispatchVGPRs ( unsigned Count)
inline

Definition at line 1044 of file SIMachineFunctionInfo.h.

References llvm::Count.

◆ setPrivateSegmentWaveByteOffset()

void llvm::SIMachineFunctionInfo::setPrivateSegmentWaveByteOffset ( Register Reg)
inline

Definition at line 958 of file SIMachineFunctionInfo.h.

References llvm::ArgDescriptor::createRegister(), and Reg.

◆ setScratchReservedForDynamicVGPRs()

void llvm::SIMachineFunctionInfo::setScratchReservedForDynamicVGPRs ( unsigned SizeInBytes)
inline

◆ setScratchRSrcReg()

void llvm::SIMachineFunctionInfo::setScratchRSrcReg ( Register Reg)
inline

Definition at line 1058 of file SIMachineFunctionInfo.h.

References assert(), and Reg.

◆ setSGPRForEXECCopy()

void llvm::SIMachineFunctionInfo::setSGPRForEXECCopy ( Register Reg)
inline

Definition at line 827 of file SIMachineFunctionInfo.h.

References Reg.

Referenced by llvm::SIFrameLowering::determinePrologEpilogSGPRSaves().

◆ setStackPtrOffsetReg()

void llvm::SIMachineFunctionInfo::setStackPtrOffsetReg ( Register Reg)
inline

Definition at line 1072 of file SIMachineFunctionInfo.h.

References assert(), and Reg.

◆ setVGPRForAGPRCopy()

void llvm::SIMachineFunctionInfo::setVGPRForAGPRCopy ( Register NewVGPRForAGPRCopy)
inline

◆ setVGPRToAGPRSpillDead()

void llvm::SIMachineFunctionInfo::setVGPRToAGPRSpillDead ( int FrameIndex)
inline

Definition at line 839 of file SIMachineFunctionInfo.h.

References I.

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

◆ setWorkItemIDX()

void llvm::SIMachineFunctionInfo::setWorkItemIDX ( ArgDescriptor Arg)
inline

Definition at line 939 of file SIMachineFunctionInfo.h.

◆ setWorkItemIDY()

void llvm::SIMachineFunctionInfo::setWorkItemIDY ( ArgDescriptor Arg)
inline

Definition at line 943 of file SIMachineFunctionInfo.h.

◆ setWorkItemIDZ()

void llvm::SIMachineFunctionInfo::setWorkItemIDZ ( ArgDescriptor Arg)
inline

Definition at line 947 of file SIMachineFunctionInfo.h.

◆ shiftWwmVGPRsToLowestRange()

◆ splitWWMSpillRegisters()

void SIMachineFunctionInfo::splitWWMSpillRegisters ( MachineFunction & MF,
SmallVectorImpl< std::pair< Register, int > > & CalleeSavedRegs,
SmallVectorImpl< std::pair< Register, int > > & ScratchRegs ) const

◆ updatePerLaneVGPRMask()

void llvm::SIMachineFunctionInfo::updatePerLaneVGPRMask ( BitVector & RegMask)
inline

Definition at line 682 of file SIMachineFunctionInfo.h.

◆ GCNTargetMachine

friend class GCNTargetMachine
friend

Definition at line 423 of file SIMachineFunctionInfo.h.

References GCNTargetMachine.

Referenced by GCNTargetMachine.

Member Data Documentation

◆ MFMAVGPRForm

bool SIMachineFunctionInfo::MFMAVGPRForm = false
static

Definition at line 552 of file SIMachineFunctionInfo.h.

Referenced by selectAGPRFormMFMA().


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