LLVM 20.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
llvm::AMDGPU Namespace Reference

Namespaces

namespace  Barrier
 
namespace  CPol
 
namespace  DepCtr
 
namespace  DPP
 
namespace  ElfNote
 
namespace  EncValues
 
namespace  Exp
 
namespace  GenericVersion
 Generic target versions emitted by this version of LLVM.
 
namespace  HSAMD
 
namespace  HWEncoding
 
namespace  Hwreg
 
namespace  ImplicitArg
 
namespace  IsaInfo
 
namespace  MTBUFFormat
 
namespace  PALMD
 
namespace  SDWA
 
namespace  SendMsg
 
namespace  Swizzle
 
namespace  UCVersion
 
namespace  UfmtGFX10
 
namespace  UfmtGFX11
 
namespace  VGPRIndexMode
 
namespace  VirtRegFlag
 
namespace  VOP3PEncoding
 
namespace  VOPD
 

Classes

struct  AMDGPUMCKernelCodeT
 
struct  CanBeVOPD
 
struct  CustomOperand
 
struct  CustomOperandVal
 
struct  D16ImageDimIntrinsic
 
struct  EncodingField
 
struct  EncodingFields
 
struct  GcnBufferFormatInfo
 
struct  ImageDimIntrinsicInfo
 
struct  IsaVersion
 Instruction set architecture version. More...
 
struct  LDSUsesInfoTy
 
struct  MAIInstInfo
 
struct  MCKernelDescriptor
 
struct  MIMGBaseOpcodeInfo
 
struct  MIMGBiasMappingInfo
 
struct  MIMGDimInfo
 
struct  MIMGG16MappingInfo
 
struct  MIMGInfo
 
struct  MIMGLZMappingInfo
 
struct  MIMGMIPMappingInfo
 
struct  MIMGOffsetMappingInfo
 
struct  MTBUFInfo
 
struct  MUBUFInfo
 
struct  RsrcIntrinsic
 
struct  SingleUseExceptionInfo
 
struct  SMInfo
 
struct  VOP3CDPPAsmOnlyInfo
 
struct  VOPC64DPPInfo
 
struct  VOPCDPPAsmOnlyInfo
 
struct  VOPDComponentInfo
 
struct  VOPDInfo
 
struct  VOPInfo
 
struct  VOPTrue16Info
 
struct  Waitcnt
 Represents the counter values to wait for in an s_waitcnt instruction. More...
 
struct  WMMAOpcodeMappingInfo
 

Typedefs

using FunctionVariableMap = DenseMap< Function *, DenseSet< GlobalVariable * > >
 
using VariableFunctionMap = DenseMap< GlobalVariable *, DenseSet< Function * > >
 
template<unsigned Bit, unsigned D = 0>
using EncodingBit = EncodingField< Bit, Bit, D >
 

Enumerations

enum  GPUKind : uint32_t {
  GK_NONE = 0 , GK_R600 = 1 , GK_R630 = 2 , GK_RS880 = 3 ,
  GK_RV670 = 4 , GK_RV710 = 5 , GK_RV730 = 6 , GK_RV770 = 7 ,
  GK_CEDAR = 8 , GK_CYPRESS = 9 , GK_JUNIPER = 10 , GK_REDWOOD = 11 ,
  GK_SUMO = 12 , GK_BARTS = 13 , GK_CAICOS = 14 , GK_CAYMAN = 15 ,
  GK_TURKS = 16 , GK_R600_FIRST = GK_R600 , GK_R600_LAST = GK_TURKS , GK_GFX600 = 32 ,
  GK_GFX601 = 33 , GK_GFX602 = 34 , GK_GFX700 = 40 , GK_GFX701 = 41 ,
  GK_GFX702 = 42 , GK_GFX703 = 43 , GK_GFX704 = 44 , GK_GFX705 = 45 ,
  GK_GFX801 = 50 , GK_GFX802 = 51 , GK_GFX803 = 52 , GK_GFX805 = 53 ,
  GK_GFX810 = 54 , GK_GFX900 = 60 , GK_GFX902 = 61 , GK_GFX904 = 62 ,
  GK_GFX906 = 63 , GK_GFX908 = 64 , GK_GFX909 = 65 , GK_GFX90A = 66 ,
  GK_GFX90C = 67 , GK_GFX940 = 68 , GK_GFX941 = 69 , GK_GFX942 = 70 ,
  GK_GFX1010 = 71 , GK_GFX1011 = 72 , GK_GFX1012 = 73 , GK_GFX1013 = 74 ,
  GK_GFX1030 = 75 , GK_GFX1031 = 76 , GK_GFX1032 = 77 , GK_GFX1033 = 78 ,
  GK_GFX1034 = 79 , GK_GFX1035 = 80 , GK_GFX1036 = 81 , GK_GFX1100 = 90 ,
  GK_GFX1101 = 91 , GK_GFX1102 = 92 , GK_GFX1103 = 93 , GK_GFX1150 = 94 ,
  GK_GFX1151 = 95 , GK_GFX1152 = 96 , GK_GFX1200 = 100 , GK_GFX1201 = 101 ,
  GK_AMDGCN_FIRST = GK_GFX600 , GK_AMDGCN_LAST = GK_GFX1201 , GK_GFX9_GENERIC = 192 , GK_GFX10_1_GENERIC = 193 ,
  GK_GFX10_3_GENERIC = 194 , GK_GFX11_GENERIC = 195 , GK_GFX12_GENERIC = 196 , GK_AMDGCN_GENERIC_FIRST = GK_GFX9_GENERIC ,
  GK_AMDGCN_GENERIC_LAST = GK_GFX12_GENERIC
}
 GPU kinds supported by the AMDGPU target. More...
 
enum  ArchFeatureKind : uint32_t {
  FEATURE_NONE = 0 , FEATURE_FMA = 1 << 1 , FEATURE_LDEXP = 1 << 2 , FEATURE_FP64 = 1 << 3 ,
  FEATURE_FAST_FMA_F32 = 1 << 4 , FEATURE_FAST_DENORMAL_F32 = 1 << 5 , FEATURE_WAVE32 = 1 << 6 , FEATURE_XNACK = 1 << 7 ,
  FEATURE_SRAMECC = 1 << 8 , FEATURE_WGP = 1 << 9
}
 
enum  FeatureError : uint32_t { NO_ERROR = 0 , INVALID_FEATURE_COMBINATION , UNSUPPORTED_TARGET_FEATURE }
 
enum  TargetIndex {
  TI_CONSTDATA_START , TI_SCRATCH_RSRC_DWORD0 , TI_SCRATCH_RSRC_DWORD1 , TI_SCRATCH_RSRC_DWORD2 ,
  TI_SCRATCH_RSRC_DWORD3
}
 
enum class  SchedulingPhase { Initial , PreRAReentry , PostRA }
 
enum  Fixups { fixup_si_sopp_br = FirstTargetFixupKind , LastTargetFixupKind , NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind }
 
enum  OperandType : unsigned {
  OPERAND_REG_IMM_INT32 = MCOI::OPERAND_FIRST_TARGET , OPERAND_REG_IMM_INT64 , OPERAND_REG_IMM_INT16 , OPERAND_REG_IMM_FP32 ,
  OPERAND_REG_IMM_FP64 , OPERAND_REG_IMM_BF16 , OPERAND_REG_IMM_FP16 , OPERAND_REG_IMM_BF16_DEFERRED ,
  OPERAND_REG_IMM_FP16_DEFERRED , OPERAND_REG_IMM_FP32_DEFERRED , OPERAND_REG_IMM_V2BF16 , OPERAND_REG_IMM_V2FP16 ,
  OPERAND_REG_IMM_V2INT16 , OPERAND_REG_IMM_V2INT32 , OPERAND_REG_IMM_V2FP32 , OPERAND_REG_INLINE_C_INT16 ,
  OPERAND_REG_INLINE_C_INT32 , OPERAND_REG_INLINE_C_INT64 , OPERAND_REG_INLINE_C_BF16 , OPERAND_REG_INLINE_C_FP16 ,
  OPERAND_REG_INLINE_C_FP32 , OPERAND_REG_INLINE_C_FP64 , OPERAND_REG_INLINE_C_V2INT16 , OPERAND_REG_INLINE_C_V2BF16 ,
  OPERAND_REG_INLINE_C_V2FP16 , OPERAND_REG_INLINE_C_V2INT32 , OPERAND_REG_INLINE_C_V2FP32 , OPERAND_INLINE_SPLIT_BARRIER_INT32 ,
  OPERAND_KIMM32 , OPERAND_KIMM16 , OPERAND_REG_INLINE_AC_INT16 , OPERAND_REG_INLINE_AC_INT32 ,
  OPERAND_REG_INLINE_AC_BF16 , OPERAND_REG_INLINE_AC_FP16 , OPERAND_REG_INLINE_AC_FP32 , OPERAND_REG_INLINE_AC_FP64 ,
  OPERAND_REG_INLINE_AC_V2INT16 , OPERAND_REG_INLINE_AC_V2BF16 , OPERAND_REG_INLINE_AC_V2FP16 , OPERAND_REG_INLINE_AC_V2INT32 ,
  OPERAND_REG_INLINE_AC_V2FP32 , OPERAND_INPUT_MODS , OPERAND_SDWA_VOPC_DST , OPERAND_REG_IMM_FIRST = OPERAND_REG_IMM_INT32 ,
  OPERAND_REG_IMM_LAST = OPERAND_REG_IMM_V2FP32 , OPERAND_REG_INLINE_C_FIRST = OPERAND_REG_INLINE_C_INT16 , OPERAND_REG_INLINE_C_LAST = OPERAND_REG_INLINE_AC_V2FP32 , OPERAND_REG_INLINE_AC_FIRST = OPERAND_REG_INLINE_AC_INT16 ,
  OPERAND_REG_INLINE_AC_LAST = OPERAND_REG_INLINE_AC_V2FP32 , OPERAND_SRC_FIRST = OPERAND_REG_IMM_INT32 , OPERAND_SRC_LAST = OPERAND_REG_INLINE_C_LAST , OPERAND_KIMM_FIRST = OPERAND_KIMM32 ,
  OPERAND_KIMM_LAST = OPERAND_KIMM16
}
 
enum  OperandSemantics : unsigned {
  INT = 0 , FP16 = 1 , BF16 = 2 , FP32 = 3 ,
  FP64 = 4
}
 
enum  AsmComments { SGPR_SPILL = MachineInstr::TAsmComments }
 
enum  AMDGPUFltRounds : int8_t {
  TowardZero = static_cast<int8_t>(RoundingMode::TowardZero) , NearestTiesToEven = static_cast<int8_t>(RoundingMode::NearestTiesToEven) , TowardPositive = static_cast<int8_t>(RoundingMode::TowardPositive) , TowardNegative = static_cast<int8_t>(RoundingMode::TowardNegative) ,
  NearestTiesToAwayUnsupported , Dynamic = static_cast<int8_t>(RoundingMode::Dynamic) , NearestTiesToEvenF32_NearestTiesToEvenF64 = NearestTiesToEven , NearestTiesToEvenF32_TowardPositiveF64 = 8 ,
  NearestTiesToEvenF32_TowardNegativeF64 = 9 , NearestTiesToEvenF32_TowardZeroF64 = 10 , TowardPositiveF32_NearestTiesToEvenF64 = 11 , TowardPositiveF32_TowardPositiveF64 = TowardPositive ,
  TowardPositiveF32_TowardNegativeF64 = 12 , TowardPositiveF32_TowardZeroF64 = 13 , TowardNegativeF32_NearestTiesToEvenF64 = 14 , TowardNegativeF32_TowardPositiveF64 = 15 ,
  TowardNegativeF32_TowardNegativeF64 = TowardNegative , TowardNegativeF32_TowardZeroF64 = 16 , TowardZeroF32_NearestTiesToEvenF64 = 17 , TowardZeroF32_TowardPositiveF64 = 18 ,
  TowardZeroF32_TowardNegativeF64 = 19 , TowardZeroF32_TowardZeroF64 = TowardZero , Invalid = static_cast<int8_t>(RoundingMode::Invalid)
}
 Return values used for llvm.get.rounding. More...
 
enum  { AMDHSA_COV4 = 4 , AMDHSA_COV5 = 5 , AMDHSA_COV6 = 6 }
 

Functions

StringRef getArchFamilyNameAMDGCN (GPUKind AK)
 
StringRef getArchNameAMDGCN (GPUKind AK)
 
StringRef getArchNameR600 (GPUKind AK)
 
StringRef getCanonicalArchName (const Triple &T, StringRef Arch)
 
GPUKind parseArchAMDGCN (StringRef CPU)
 
GPUKind parseArchR600 (StringRef CPU)
 
unsigned getArchAttrAMDGCN (GPUKind AK)
 
unsigned getArchAttrR600 (GPUKind AK)
 
void fillValidArchListAMDGCN (SmallVectorImpl< StringRef > &Values)
 
void fillValidArchListR600 (SmallVectorImpl< StringRef > &Values)
 
IsaVersion getIsaVersion (StringRef GPU)
 
void fillAMDGPUFeatureMap (StringRef GPU, const Triple &T, StringMap< bool > &Features)
 Fills Features map with default values for given target GPU.
 
std::pair< FeatureError, StringRefinsertWaveSizeFeature (StringRef GPU, const Triple &T, StringMap< bool > &Features)
 Inserts wave size feature for given GPU into features map.
 
bool isFlatGlobalAddrSpace (unsigned AS)
 
bool isExtendedGlobalAddrSpace (unsigned AS)
 
static bool addrspacesMayAlias (unsigned AS1, unsigned AS2)
 
static uint64_t getRedzoneSizeForScale (int AsanScale)
 
static uint64_t getMinRedzoneSizeForGlobal (int AsanScale)
 
uint64_t getRedzoneSizeForGlobal (int Scale, uint64_t SizeInBytes)
 Given SizeInBytes of the Value to be instrunmented, Returns the redzone size corresponding to it.
 
static size_t TypeStoreSizeToSizeIndex (uint32_t TypeSize)
 
static InstructiongenAMDGPUReportBlock (Module &M, IRBuilder<> &IRB, Value *Cond, bool Recover)
 
static ValuecreateSlowPathCmp (Module &M, IRBuilder<> &IRB, Type *IntptrTy, Value *AddrLong, Value *ShadowValue, uint32_t TypeStoreSize, int AsanScale)
 
static InstructiongenerateCrashCode (Module &M, IRBuilder<> &IRB, Type *IntptrTy, Instruction *InsertBefore, Value *Addr, bool IsWrite, size_t AccessSizeIndex, Value *SizeArgument, bool Recover)
 
static ValuememToShadow (Module &M, IRBuilder<> &IRB, Type *IntptrTy, Value *Shadow, int AsanScale, uint32_t AsanOffset)
 
static void instrumentAddressImpl (Module &M, IRBuilder<> &IRB, Instruction *OrigIns, Instruction *InsertBefore, Value *Addr, Align Alignment, uint32_t TypeStoreSize, bool IsWrite, Value *SizeArgument, bool UseCalls, bool Recover, int AsanScale, int AsanOffset)
 
void instrumentAddress (Module &M, IRBuilder<> &IRB, Instruction *OrigIns, Instruction *InsertBefore, Value *Addr, Align Alignment, TypeSize TypeStoreSize, bool IsWrite, Value *SizeArgument, bool UseCalls, bool Recover, int Scale, int Offset)
 Instrument the memory operand Addr.
 
void getInterestingMemoryOperands (Module &M, Instruction *I, SmallVectorImpl< InterestingMemoryOperand > &Interesting)
 Get all the memory operands from the instruction that needs to be instrumented.
 
std::pair< Register, unsignedgetBaseWithConstantOffset (MachineRegisterInfo &MRI, Register Reg, GISelKnownBits *KnownBits=nullptr, bool CheckNUW=false)
 Returns base register and constant offset.
 
Intrinsic::ID getIntrinsicID (const MachineInstr &I)
 Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.
 
const RsrcIntrinsiclookupRsrcIntrinsic (unsigned Intr)
 
const D16ImageDimIntrinsiclookupD16ImageDimIntrinsic (unsigned Intr)
 
const ImageDimIntrinsicInfogetImageDimIntrinsicInfo (unsigned Intr)
 
const ImageDimIntrinsicInfogetImageDimIntrinsicByBaseOpcode (unsigned BaseOpcode, unsigned Dim)
 
Align getAlign (const DataLayout &DL, const GlobalVariable *GV)
 
bool isDynamicLDS (const GlobalVariable &GV)
 
bool isLDSVariableToLower (const GlobalVariable &GV)
 
bool eliminateConstantExprUsesOfLDSFromAllInstructions (Module &M)
 
void getUsesOfLDSByFunction (const CallGraph &CG, Module &M, FunctionVariableMap &kernels, FunctionVariableMap &Functions)
 
bool isKernelLDS (const Function *F)
 
LDSUsesInfoTy getTransitiveUsesOfLDS (const CallGraph &CG, Module &M)
 
void removeFnAttrFromReachable (CallGraph &CG, Function *KernelRoot, ArrayRef< StringRef > FnAttrs)
 Strip FnAttr attribute from any functions where we may have introduced its use.
 
bool isReallyAClobber (const Value *Ptr, MemoryDef *Def, AAResults *AA)
 Given a Def clobbering a load from Ptr according to the MSSA check if this is actually a memory update or an artificial clobber to facilitate ordering constraints.
 
bool isClobberedInFunction (const LoadInst *Load, MemorySSA *MSSA, AAResults *AA)
 Check is a Load is clobbered in its function.
 
void printAMDGPUMCExpr (const MCExpr *Expr, raw_ostream &OS, const MCAsmInfo *MAI)
 
const MCExprfoldAMDGPUMCExpr (const MCExpr *Expr, MCContext &Ctx)
 
LLVM_READONLY int getVOPe64 (uint16_t Opcode)
 
LLVM_READONLY int getVOPe32 (uint16_t Opcode)
 
LLVM_READONLY int getSDWAOp (uint16_t Opcode)
 
LLVM_READONLY int getDPPOp32 (uint16_t Opcode)
 
LLVM_READONLY int getDPPOp64 (uint16_t Opcode)
 
LLVM_READONLY int getBasicFromSDWAOp (uint16_t Opcode)
 
LLVM_READONLY int getCommuteRev (uint16_t Opcode)
 
LLVM_READONLY int getCommuteOrig (uint16_t Opcode)
 
LLVM_READONLY int getAddr64Inst (uint16_t Opcode)
 
LLVM_READONLY int getIfAddr64Inst (uint16_t Opcode)
 Check if Opcode is an Addr64 opcode.
 
LLVM_READONLY int getSOPKOp (uint16_t Opcode)
 
LLVM_READONLY int getGlobalSaddrOp (uint16_t Opcode)
 
LLVM_READONLY int getGlobalVaddrOp (uint16_t Opcode)
 
LLVM_READONLY int getVCMPXNoSDstOp (uint16_t Opcode)
 
LLVM_READONLY int getFlatScratchInstSTfromSS (uint16_t Opcode)
 
LLVM_READONLY int getFlatScratchInstSVfromSVS (uint16_t Opcode)
 
LLVM_READONLY int getFlatScratchInstSSfromSV (uint16_t Opcode)
 
LLVM_READONLY int getFlatScratchInstSVfromSS (uint16_t Opcode)
 
LLVM_READONLY int getMFMAEarlyClobberOp (uint16_t Opcode)
 
LLVM_READONLY int getVCMPXOpFromVCMP (uint16_t Opcode)
 
uint32_t decodeFltRoundToHWConversionTable (uint32_t FltRounds)
 Read the hardware rounding mode equivalent of a AMDGPUFltRounds value.
 
unsigned getRegBitWidth (const TargetRegisterClass &RC)
 Get the size in bits of a register from the register class RC.
 
template<size_t N>
static StringRef getNameFromOperandTable (const CustomOperand(&Table)[N], unsigned Encoding, const MCSubtargetInfo &STI)
 Map from the encoding of a sendmsg/hwreg asm operand to it's name.
 
template<size_t N>
static int64_t getEncodingFromOperandTable (const CustomOperand(&Table)[N], StringRef Name, const MCSubtargetInfo &STI)
 Map from a symbolic name for a sendmsg/hwreg asm operand to it's encoding.
 
bool hasSMRDSignedImmOffset (const MCSubtargetInfo &ST)
 
bool isHsaAbi (const MCSubtargetInfo &STI)
 
unsigned getAMDHSACodeObjectVersion (const Module &M)
 
unsigned getDefaultAMDHSACodeObjectVersion ()
 
unsigned getAMDHSACodeObjectVersion (unsigned ABIVersion)
 
uint8_t getELFABIVersion (const Triple &T, unsigned CodeObjectVersion)
 
unsigned getMultigridSyncArgImplicitArgPosition (unsigned CodeObjectVersion)
 
unsigned getHostcallImplicitArgPosition (unsigned CodeObjectVersion)
 
unsigned getDefaultQueueImplicitArgPosition (unsigned CodeObjectVersion)
 
unsigned getCompletionActionImplicitArgPosition (unsigned CodeObjectVersion)
 
int getMIMGOpcode (unsigned BaseOpcode, unsigned MIMGEncoding, unsigned VDataDwords, unsigned VAddrDwords)
 
const MIMGBaseOpcodeInfogetMIMGBaseOpcode (unsigned Opc)
 
int getMaskedMIMGOp (unsigned Opc, unsigned NewChannels)
 
unsigned getAddrSizeMIMGOp (const MIMGBaseOpcodeInfo *BaseOpcode, const MIMGDimInfo *Dim, bool IsA16, bool IsG16Supported)
 
int getMTBUFBaseOpcode (unsigned Opc)
 
int getMTBUFOpcode (unsigned BaseOpc, unsigned Elements)
 
int getMTBUFElements (unsigned Opc)
 
bool getMTBUFHasVAddr (unsigned Opc)
 
bool getMTBUFHasSrsrc (unsigned Opc)
 
bool getMTBUFHasSoffset (unsigned Opc)
 
int getMUBUFBaseOpcode (unsigned Opc)
 
int getMUBUFOpcode (unsigned BaseOpc, unsigned Elements)
 
int getMUBUFElements (unsigned Opc)
 
bool getMUBUFHasVAddr (unsigned Opc)
 
bool getMUBUFHasSrsrc (unsigned Opc)
 
bool getMUBUFHasSoffset (unsigned Opc)
 
bool getMUBUFIsBufferInv (unsigned Opc)
 
bool getMUBUFTfe (unsigned Opc)
 
bool getSMEMIsBuffer (unsigned Opc)
 
bool getVOP1IsSingle (unsigned Opc)
 
bool getVOP2IsSingle (unsigned Opc)
 
bool getVOP3IsSingle (unsigned Opc)
 
bool isVOPC64DPP (unsigned Opc)
 
bool isVOPCAsmOnly (unsigned Opc)
 
bool getMAIIsDGEMM (unsigned Opc)
 Returns true if MAI operation is a double precision GEMM.
 
bool getMAIIsGFX940XDL (unsigned Opc)
 
unsigned getVOPDEncodingFamily (const MCSubtargetInfo &ST)
 
CanBeVOPD getCanBeVOPD (unsigned Opc)
 
unsigned getVOPDOpcode (unsigned Opc)
 
bool isVOPD (unsigned Opc)
 
bool isMAC (unsigned Opc)
 
bool isPermlane16 (unsigned Opc)
 
bool isCvt_F32_Fp8_Bf8_e64 (unsigned Opc)
 
bool isGenericAtomic (unsigned Opc)
 
bool isTrue16Inst (unsigned Opc)
 
bool isInvalidSingleUseConsumerInst (unsigned Opc)
 
bool isInvalidSingleUseProducerInst (unsigned Opc)
 
unsigned mapWMMA2AddrTo3AddrOpcode (unsigned Opc)
 
unsigned mapWMMA3AddrTo2AddrOpcode (unsigned Opc)
 
int getMCOpcode (uint16_t Opcode, unsigned Gen)
 
int getVOPDFull (unsigned OpX, unsigned OpY, unsigned EncodingFamily)
 
std::pair< unsigned, unsignedgetVOPDComponents (unsigned VOPDOpcode)
 
VOPD::InstInfo getVOPDInstInfo (const MCInstrDesc &OpX, const MCInstrDesc &OpY)
 
VOPD::InstInfo getVOPDInstInfo (unsigned VOPDOpcode, const MCInstrInfo *InstrInfo)
 
void initDefaultAMDKernelCodeT (AMDGPUMCKernelCodeT &KernelCode, const MCSubtargetInfo *STI)
 
bool isGroupSegment (const GlobalValue *GV)
 
bool isGlobalSegment (const GlobalValue *GV)
 
bool isReadOnlySegment (const GlobalValue *GV)
 
bool shouldEmitConstantsToTextSection (const Triple &TT)
 
std::pair< unsigned, unsignedgetIntegerPairAttribute (const Function &F, StringRef Name, std::pair< unsigned, unsigned > Default, bool OnlyFirstRequired)
 
SmallVector< unsignedgetIntegerVecAttribute (const Function &F, StringRef Name, unsigned Size)
 
unsigned getVmcntBitMask (const IsaVersion &Version)
 
unsigned getLoadcntBitMask (const IsaVersion &Version)
 
unsigned getSamplecntBitMask (const IsaVersion &Version)
 
unsigned getBvhcntBitMask (const IsaVersion &Version)
 
unsigned getExpcntBitMask (const IsaVersion &Version)
 
unsigned getLgkmcntBitMask (const IsaVersion &Version)
 
unsigned getDscntBitMask (const IsaVersion &Version)
 
unsigned getKmcntBitMask (const IsaVersion &Version)
 
unsigned getStorecntBitMask (const IsaVersion &Version)
 
unsigned getWaitcntBitMask (const IsaVersion &Version)
 
unsigned decodeVmcnt (const IsaVersion &Version, unsigned Waitcnt)
 
unsigned decodeExpcnt (const IsaVersion &Version, unsigned Waitcnt)
 
unsigned decodeLgkmcnt (const IsaVersion &Version, unsigned Waitcnt)
 
void decodeWaitcnt (const IsaVersion &Version, unsigned Waitcnt, unsigned &Vmcnt, unsigned &Expcnt, unsigned &Lgkmcnt)
 Decodes Vmcnt, Expcnt and Lgkmcnt from given Waitcnt for given isa Version, and writes decoded values into Vmcnt, Expcnt and Lgkmcnt respectively.
 
Waitcnt decodeWaitcnt (const IsaVersion &Version, unsigned Encoded)
 
unsigned encodeVmcnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Vmcnt)
 
unsigned encodeExpcnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Expcnt)
 
unsigned encodeLgkmcnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Lgkmcnt)
 
unsigned encodeWaitcnt (const IsaVersion &Version, unsigned Vmcnt, unsigned Expcnt, unsigned Lgkmcnt)
 Encodes Vmcnt, Expcnt and Lgkmcnt into Waitcnt for given isa Version.
 
unsigned encodeWaitcnt (const IsaVersion &Version, const Waitcnt &Decoded)
 
static unsigned getCombinedCountBitMask (const IsaVersion &Version, bool IsStore)
 
Waitcnt decodeLoadcntDscnt (const IsaVersion &Version, unsigned LoadcntDscnt)
 
Waitcnt decodeStorecntDscnt (const IsaVersion &Version, unsigned StorecntDscnt)
 
static unsigned encodeLoadcnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Loadcnt)
 
static unsigned encodeStorecnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Storecnt)
 
static unsigned encodeDscnt (const IsaVersion &Version, unsigned Waitcnt, unsigned Dscnt)
 
static unsigned encodeLoadcntDscnt (const IsaVersion &Version, unsigned Loadcnt, unsigned Dscnt)
 
unsigned encodeLoadcntDscnt (const IsaVersion &Version, const Waitcnt &Decoded)
 
static unsigned encodeStorecntDscnt (const IsaVersion &Version, unsigned Storecnt, unsigned Dscnt)
 
unsigned encodeStorecntDscnt (const IsaVersion &Version, const Waitcnt &Decoded)
 
static unsigned getDefaultCustomOperandEncoding (const CustomOperandVal *Opr, int Size, const MCSubtargetInfo &STI)
 
static bool isSymbolicCustomOperandEncoding (const CustomOperandVal *Opr, int Size, unsigned Code, bool &HasNonDefaultVal, const MCSubtargetInfo &STI)
 
static bool decodeCustomOperand (const CustomOperandVal *Opr, int Size, unsigned Code, int &Idx, StringRef &Name, unsigned &Val, bool &IsDefault, const MCSubtargetInfo &STI)
 
static int encodeCustomOperandVal (const CustomOperandVal &Op, int64_t InputVal)
 
static int encodeCustomOperand (const CustomOperandVal *Opr, int Size, const StringRef Name, int64_t InputVal, unsigned &UsedOprMask, const MCSubtargetInfo &STI)
 
unsigned getInitialPSInputAddr (const Function &F)
 
bool getHasColorExport (const Function &F)
 
bool getHasDepthExport (const Function &F)
 
bool isShader (CallingConv::ID cc)
 
bool isGraphics (CallingConv::ID cc)
 
bool isCompute (CallingConv::ID cc)
 
bool isEntryFunctionCC (CallingConv::ID CC)
 
bool isModuleEntryFunctionCC (CallingConv::ID CC)
 
bool isChainCC (CallingConv::ID CC)
 
bool isKernelCC (const Function *Func)
 
bool hasXNACK (const MCSubtargetInfo &STI)
 
bool hasSRAMECC (const MCSubtargetInfo &STI)
 
bool hasMIMG_R128 (const MCSubtargetInfo &STI)
 
bool hasA16 (const MCSubtargetInfo &STI)
 
bool hasG16 (const MCSubtargetInfo &STI)
 
bool hasPackedD16 (const MCSubtargetInfo &STI)
 
bool hasGDS (const MCSubtargetInfo &STI)
 
unsigned getNSAMaxSize (const MCSubtargetInfo &STI, bool HasSampler)
 
unsigned getMaxNumUserSGPRs (const MCSubtargetInfo &STI)
 
bool isSI (const MCSubtargetInfo &STI)
 
bool isCI (const MCSubtargetInfo &STI)
 
bool isVI (const MCSubtargetInfo &STI)
 
bool isGFX9 (const MCSubtargetInfo &STI)
 
bool isGFX9_GFX10 (const MCSubtargetInfo &STI)
 
bool isGFX9_GFX10_GFX11 (const MCSubtargetInfo &STI)
 
bool isGFX8_GFX9_GFX10 (const MCSubtargetInfo &STI)
 
bool isGFX8Plus (const MCSubtargetInfo &STI)
 
bool isGFX9Plus (const MCSubtargetInfo &STI)
 
bool isNotGFX9Plus (const MCSubtargetInfo &STI)
 
bool isGFX10 (const MCSubtargetInfo &STI)
 
bool isGFX10_GFX11 (const MCSubtargetInfo &STI)
 
bool isGFX10Plus (const MCSubtargetInfo &STI)
 
bool isGFX11 (const MCSubtargetInfo &STI)
 
bool isGFX11Plus (const MCSubtargetInfo &STI)
 
bool isGFX12 (const MCSubtargetInfo &STI)
 
bool isGFX12Plus (const MCSubtargetInfo &STI)
 
bool isNotGFX12Plus (const MCSubtargetInfo &STI)
 
bool isNotGFX11Plus (const MCSubtargetInfo &STI)
 
bool isNotGFX10Plus (const MCSubtargetInfo &STI)
 
bool isGFX10Before1030 (const MCSubtargetInfo &STI)
 
bool isGCN3Encoding (const MCSubtargetInfo &STI)
 
bool isGFX10_AEncoding (const MCSubtargetInfo &STI)
 
bool isGFX10_BEncoding (const MCSubtargetInfo &STI)
 
bool hasGFX10_3Insts (const MCSubtargetInfo &STI)
 
bool isGFX10_3_GFX11 (const MCSubtargetInfo &STI)
 
bool isGFX90A (const MCSubtargetInfo &STI)
 
bool isGFX940 (const MCSubtargetInfo &STI)
 
bool hasArchitectedFlatScratch (const MCSubtargetInfo &STI)
 
bool hasMAIInsts (const MCSubtargetInfo &STI)
 
bool hasVOPD (const MCSubtargetInfo &STI)
 
bool hasDPPSrc1SGPR (const MCSubtargetInfo &STI)
 
unsigned hasKernargPreload (const MCSubtargetInfo &STI)
 
int32_t getTotalNumVGPRs (bool has90AInsts, int32_t ArgNumAGPR, int32_t ArgNumVGPR)
 
bool isSGPR (unsigned Reg, const MCRegisterInfo *TRI)
 Is Reg - scalar register.
 
bool isHi16Reg (MCRegister Reg, const MCRegisterInfo &MRI)
 
unsigned getMCReg (unsigned Reg, const MCSubtargetInfo &STI)
 If Reg is a pseudo reg, return the correct hardware register given STI otherwise return Reg.
 
unsigned mc2PseudoReg (unsigned Reg)
 Convert hardware register Reg to a pseudo register.
 
bool isInlineValue (unsigned Reg)
 
bool isSISrcOperand (const MCInstrDesc &Desc, unsigned OpNo)
 Is this an AMDGPU specific source operand? These include registers, inline constants, literals and mandatory literals (KImm).
 
bool isKImmOperand (const MCInstrDesc &Desc, unsigned OpNo)
 Is this a KImm operand?
 
bool isSISrcFPOperand (const MCInstrDesc &Desc, unsigned OpNo)
 Is this floating-point operand?
 
bool isSISrcInlinableOperand (const MCInstrDesc &Desc, unsigned OpNo)
 Does this operand support only inlinable literals?
 
unsigned getRegBitWidth (unsigned RCID)
 Get the size in bits of a register from the register class RC.
 
unsigned getRegBitWidth (const MCRegisterClass &RC)
 Get the size in bits of a register from the register class RC.
 
unsigned getRegOperandSize (const MCRegisterInfo *MRI, const MCInstrDesc &Desc, unsigned OpNo)
 Get size of register operand.
 
bool isInlinableLiteral64 (int64_t Literal, bool HasInv2Pi)
 Is this literal inlinable.
 
bool isInlinableLiteral32 (int32_t Literal, bool HasInv2Pi)
 
bool isInlinableLiteralBF16 (int16_t Literal, bool HasInv2Pi)
 
bool isInlinableLiteralI16 (int32_t Literal, bool HasInv2Pi)
 
bool isInlinableLiteralFP16 (int16_t Literal, bool HasInv2Pi)
 
std::optional< unsignedgetInlineEncodingV216 (bool IsFloat, uint32_t Literal)
 
std::optional< unsignedgetInlineEncodingV2I16 (uint32_t Literal)
 
std::optional< unsignedgetInlineEncodingV2BF16 (uint32_t Literal)
 
std::optional< unsignedgetInlineEncodingV2F16 (uint32_t Literal)
 
bool isInlinableLiteralV216 (uint32_t Literal, uint8_t OpType)
 
bool isInlinableLiteralV2I16 (uint32_t Literal)
 
bool isInlinableLiteralV2BF16 (uint32_t Literal)
 
bool isInlinableLiteralV2F16 (uint32_t Literal)
 
bool isValid32BitLiteral (uint64_t Val, bool IsFP64)
 
bool isArgPassedInSGPR (const Argument *A)
 
bool isArgPassedInSGPR (const CallBase *CB, unsigned ArgNo)
 
static bool hasSMEMByteOffset (const MCSubtargetInfo &ST)
 
bool isLegalSMRDEncodedUnsignedOffset (const MCSubtargetInfo &ST, int64_t EncodedOffset)
 
bool isLegalSMRDEncodedSignedOffset (const MCSubtargetInfo &ST, int64_t EncodedOffset, bool IsBuffer)
 
static bool isDwordAligned (uint64_t ByteOffset)
 
uint64_t convertSMRDOffsetUnits (const MCSubtargetInfo &ST, uint64_t ByteOffset)
 Convert ByteOffset to dwords if the subtarget uses dword SMRD immediate offsets.
 
std::optional< int64_t > getSMRDEncodedOffset (const MCSubtargetInfo &ST, int64_t ByteOffset, bool IsBuffer, bool HasSOffset)
 
std::optional< int64_t > getSMRDEncodedLiteralOffset32 (const MCSubtargetInfo &ST, int64_t ByteOffset)
 
unsigned getNumFlatOffsetBits (const MCSubtargetInfo &ST)
 For pre-GFX12 FLAT instructions the offset must be positive; MSB is ignored and forced to zero.
 
bool isIntrinsicSourceOfDivergence (unsigned IntrID)
 
bool isIntrinsicAlwaysUniform (unsigned IntrID)
 
const GcnBufferFormatInfogetGcnBufferFormatInfo (uint8_t BitsPerComp, uint8_t NumComponents, uint8_t NumFormat, const MCSubtargetInfo &STI)
 
const GcnBufferFormatInfogetGcnBufferFormatInfo (uint8_t Format, const MCSubtargetInfo &STI)
 
bool hasAny64BitVGPROperands (const MCInstrDesc &OpDesc)
 
bool isDPALU_DPP (const MCInstrDesc &OpDesc)
 
unsigned getLdsDwGranularity (const MCSubtargetInfo &ST)
 
LLVM_READONLY int16_t getNamedOperandIdx (uint16_t Opcode, uint16_t NamedIdx)
 
LLVM_READONLY bool hasNamedOperand (uint64_t Opcode, uint64_t NamedIdx)
 
LLVM_READONLY int getSOPPWithRelaxation (uint16_t Opcode)
 
LLVM_READONLY const MIMGBaseOpcodeInfogetMIMGBaseOpcodeInfo (unsigned BaseOpcode)
 
LLVM_READONLY const MIMGDimInfogetMIMGDimInfo (unsigned DimEnum)
 
LLVM_READONLY const MIMGDimInfogetMIMGDimInfoByEncoding (uint8_t DimEnc)
 
LLVM_READONLY const MIMGDimInfogetMIMGDimInfoByAsmSuffix (StringRef AsmSuffix)
 
LLVM_READONLY const MIMGLZMappingInfogetMIMGLZMappingInfo (unsigned L)
 
LLVM_READONLY const MIMGMIPMappingInfogetMIMGMIPMappingInfo (unsigned MIP)
 
LLVM_READONLY const MIMGBiasMappingInfogetMIMGBiasMappingInfo (unsigned Bias)
 
LLVM_READONLY const MIMGOffsetMappingInfogetMIMGOffsetMappingInfo (unsigned Offset)
 
LLVM_READONLY const MIMGG16MappingInfogetMIMGG16MappingInfo (unsigned G)
 
LLVM_READONLY const MIMGInfogetMIMGInfo (unsigned Opc)
 
int getIntegerAttribute (const Function &F, StringRef Name, int Default)
 
LLVM_READNONE bool isKernel (CallingConv::ID CC)
 
LLVM_READNONE unsigned getOperandSize (const MCOperandInfo &OpInfo)
 
LLVM_READNONE unsigned getOperandSize (const MCInstrDesc &Desc, unsigned OpNo)
 
LLVM_READNONE bool isInlinableIntLiteral (int64_t Literal)
 Is this literal inlinable, and not one of the values intended for floating point values.
 
bool isLegalSMRDImmOffset (const MCSubtargetInfo &ST, int64_t ByteOffset)
 
LLVM_READNONE bool isLegalDPALU_DPPControl (unsigned DC)
 
constexpr std::pair< unsigned, unsignedgetShiftMask (unsigned Value)
 Deduce the least significant bit aligned shift and mask values for a binary Complement Value (as they're defined in SIDefines.h as C_*) as a returned pair<shift, mask>.
 
const MCExprmaskShiftSet (const MCExpr *Val, uint32_t Mask, uint32_t Shift, MCContext &Ctx)
 Provided with the MCExpr * Val, uint32 Mask and Shift, will return the masked and left shifted, in said order of operations, MCExpr * created within the MCContext Ctx.
 
const MCExprmaskShiftGet (const MCExpr *Val, uint32_t Mask, uint32_t Shift, MCContext &Ctx)
 Provided with the MCExpr * Val, uint32 Mask and Shift, will return the right shifted and masked, in said order of operations, MCExpr * created within the MCContext Ctx.
 

Variables

const uint64_t RSRC_DATA_FORMAT = 0xf00000000000LL
 
const uint64_t RSRC_ELEMENT_SIZE_SHIFT = (32 + 19)
 
const uint64_t RSRC_INDEX_STRIDE_SHIFT = (32 + 21)
 
const uint64_t RSRC_TID_ENABLE = UINT64_C(1) << (32 + 23)
 
static constexpr uint32_t ExtendedFltRoundOffset = 4
 Offset of nonstandard values for llvm.get.rounding results from the largest supported mode.
 
static constexpr uint32_t F32FltRoundOffset = 0
 Offset in mode register of f32 rounding mode.
 
static constexpr uint32_t F64FltRoundOffset = 2
 Offset in mode register of f64/f16 rounding mode.
 
const uint64_t FltRoundConversionTable
 
const uint64_t FltRoundToHWConversionTable
 
const int OPR_ID_UNKNOWN = -1
 
const int OPR_ID_UNSUPPORTED = -2
 
const int OPR_ID_DUPLICATE = -3
 
const int OPR_VAL_INVALID = -4
 

Typedef Documentation

◆ EncodingBit

template<unsigned Bit, unsigned D = 0>
using llvm::AMDGPU::EncodingBit = typedef EncodingField<Bit, Bit, D>

Definition at line 365 of file AMDGPUBaseInfo.h.

◆ FunctionVariableMap

Definition at line 32 of file AMDGPUMemoryUtils.h.

◆ VariableFunctionMap

Definition at line 33 of file AMDGPUMemoryUtils.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AMDHSA_COV4 
AMDHSA_COV5 
AMDHSA_COV6 

Definition at line 55 of file AMDGPUBaseInfo.h.

◆ AMDGPUFltRounds

Return values used for llvm.get.rounding.

When both the F32 and F64/F16 modes are the same, returns the standard values. If they differ, returns an extended mode starting at 8.

Enumerator
TowardZero 
NearestTiesToEven 
TowardPositive 
TowardNegative 
NearestTiesToAwayUnsupported 
Dynamic 
NearestTiesToEvenF32_NearestTiesToEvenF64 
NearestTiesToEvenF32_TowardPositiveF64 
NearestTiesToEvenF32_TowardNegativeF64 
NearestTiesToEvenF32_TowardZeroF64 
TowardPositiveF32_NearestTiesToEvenF64 
TowardPositiveF32_TowardPositiveF64 
TowardPositiveF32_TowardNegativeF64 
TowardPositiveF32_TowardZeroF64 
TowardNegativeF32_NearestTiesToEvenF64 
TowardNegativeF32_TowardPositiveF64 
TowardNegativeF32_TowardNegativeF64 
TowardNegativeF32_TowardZeroF64 
TowardZeroF32_NearestTiesToEvenF64 
TowardZeroF32_TowardPositiveF64 
TowardZeroF32_TowardNegativeF64 
TowardZeroF32_TowardZeroF64 
Invalid 

Definition at line 96 of file SIModeRegisterDefaults.h.

◆ ArchFeatureKind

Enumerator
FEATURE_NONE 
FEATURE_FMA 
FEATURE_LDEXP 
FEATURE_FP64 
FEATURE_FAST_FMA_F32 
FEATURE_FAST_DENORMAL_F32 
FEATURE_WAVE32 
FEATURE_XNACK 
FEATURE_SRAMECC 
FEATURE_WGP 

Definition at line 135 of file TargetParser.h.

◆ AsmComments

Enumerator
SGPR_SPILL 

Definition at line 1579 of file SIInstrInfo.h.

◆ FeatureError

Enumerator
NO_ERROR 
INVALID_FEATURE_COMBINATION 
UNSUPPORTED_TARGET_FEATURE 

Definition at line 160 of file TargetParser.h.

◆ Fixups

Enumerator
fixup_si_sopp_br 

16-bit PC relative fixup for SOPP branch instructions.

LastTargetFixupKind 
NumTargetFixupKinds 

Definition at line 16 of file AMDGPUFixupKinds.h.

◆ GPUKind

GPU kinds supported by the AMDGPU target.

Enumerator
GK_NONE 
GK_R600 
GK_R630 
GK_RS880 
GK_RV670 
GK_RV710 
GK_RV730 
GK_RV770 
GK_CEDAR 
GK_CYPRESS 
GK_JUNIPER 
GK_REDWOOD 
GK_SUMO 
GK_BARTS 
GK_CAICOS 
GK_CAYMAN 
GK_TURKS 
GK_R600_FIRST 
GK_R600_LAST 
GK_GFX600 
GK_GFX601 
GK_GFX602 
GK_GFX700 
GK_GFX701 
GK_GFX702 
GK_GFX703 
GK_GFX704 
GK_GFX705 
GK_GFX801 
GK_GFX802 
GK_GFX803 
GK_GFX805 
GK_GFX810 
GK_GFX900 
GK_GFX902 
GK_GFX904 
GK_GFX906 
GK_GFX908 
GK_GFX909 
GK_GFX90A 
GK_GFX90C 
GK_GFX940 
GK_GFX941 
GK_GFX942 
GK_GFX1010 
GK_GFX1011 
GK_GFX1012 
GK_GFX1013 
GK_GFX1030 
GK_GFX1031 
GK_GFX1032 
GK_GFX1033 
GK_GFX1034 
GK_GFX1035 
GK_GFX1036 
GK_GFX1100 
GK_GFX1101 
GK_GFX1102 
GK_GFX1103 
GK_GFX1150 
GK_GFX1151 
GK_GFX1152 
GK_GFX1200 
GK_GFX1201 
GK_AMDGCN_FIRST 
GK_AMDGCN_LAST 
GK_GFX9_GENERIC 
GK_GFX10_1_GENERIC 
GK_GFX10_3_GENERIC 
GK_GFX11_GENERIC 
GK_GFX12_GENERIC 
GK_AMDGCN_GENERIC_FIRST 
GK_AMDGCN_GENERIC_LAST 

Definition at line 35 of file TargetParser.h.

◆ OperandSemantics

Enumerator
INT 
FP16 
BF16 
FP32 
FP64 

Definition at line 274 of file SIDefines.h.

◆ OperandType

Enumerator
OPERAND_REG_IMM_INT32 

Operands with register or 32-bit immediate.

OPERAND_REG_IMM_INT64 
OPERAND_REG_IMM_INT16 
OPERAND_REG_IMM_FP32 
OPERAND_REG_IMM_FP64 
OPERAND_REG_IMM_BF16 
OPERAND_REG_IMM_FP16 
OPERAND_REG_IMM_BF16_DEFERRED 
OPERAND_REG_IMM_FP16_DEFERRED 
OPERAND_REG_IMM_FP32_DEFERRED 
OPERAND_REG_IMM_V2BF16 
OPERAND_REG_IMM_V2FP16 
OPERAND_REG_IMM_V2INT16 
OPERAND_REG_IMM_V2INT32 
OPERAND_REG_IMM_V2FP32 
OPERAND_REG_INLINE_C_INT16 

Operands with register or inline constant.

OPERAND_REG_INLINE_C_INT32 
OPERAND_REG_INLINE_C_INT64 
OPERAND_REG_INLINE_C_BF16 
OPERAND_REG_INLINE_C_FP16 
OPERAND_REG_INLINE_C_FP32 
OPERAND_REG_INLINE_C_FP64 
OPERAND_REG_INLINE_C_V2INT16 
OPERAND_REG_INLINE_C_V2BF16 
OPERAND_REG_INLINE_C_V2FP16 
OPERAND_REG_INLINE_C_V2INT32 
OPERAND_REG_INLINE_C_V2FP32 
OPERAND_INLINE_SPLIT_BARRIER_INT32 
OPERAND_KIMM32 

Operand with 32-bit immediate that uses the constant bus.

OPERAND_KIMM16 
OPERAND_REG_INLINE_AC_INT16 

Operands with an AccVGPR register or inline constant.

OPERAND_REG_INLINE_AC_INT32 
OPERAND_REG_INLINE_AC_BF16 
OPERAND_REG_INLINE_AC_FP16 
OPERAND_REG_INLINE_AC_FP32 
OPERAND_REG_INLINE_AC_FP64 
OPERAND_REG_INLINE_AC_V2INT16 
OPERAND_REG_INLINE_AC_V2BF16 
OPERAND_REG_INLINE_AC_V2FP16 
OPERAND_REG_INLINE_AC_V2INT32 
OPERAND_REG_INLINE_AC_V2FP32 
OPERAND_INPUT_MODS 
OPERAND_SDWA_VOPC_DST 
OPERAND_REG_IMM_FIRST 
OPERAND_REG_IMM_LAST 
OPERAND_REG_INLINE_C_FIRST 
OPERAND_REG_INLINE_C_LAST 
OPERAND_REG_INLINE_AC_FIRST 
OPERAND_REG_INLINE_AC_LAST 
OPERAND_SRC_FIRST 
OPERAND_SRC_LAST 
OPERAND_KIMM_FIRST 
OPERAND_KIMM_LAST 

Definition at line 198 of file SIDefines.h.

◆ SchedulingPhase

enum class llvm::AMDGPU::SchedulingPhase
strong
Enumerator
Initial 
PreRAReentry 
PostRA 

Definition at line 20 of file AMDGPUIGroupLP.h.

◆ TargetIndex

Enumerator
TI_CONSTDATA_START 
TI_SCRATCH_RSRC_DWORD0 
TI_SCRATCH_RSRC_DWORD1 
TI_SCRATCH_RSRC_DWORD2 
TI_SCRATCH_RSRC_DWORD3 

Definition at line 449 of file AMDGPU.h.

Function Documentation

◆ addrspacesMayAlias()

static bool llvm::AMDGPU::addrspacesMayAlias ( unsigned  AS1,
unsigned  AS2 
)
inlinestatic

◆ convertSMRDOffsetUnits()

uint64_t llvm::AMDGPU::convertSMRDOffsetUnits ( const MCSubtargetInfo ST,
uint64_t  ByteOffset 
)

Convert ByteOffset to dwords if the subtarget uses dword SMRD immediate offsets.

Definition at line 2846 of file AMDGPUBaseInfo.cpp.

References assert(), hasSMEMByteOffset(), and isDwordAligned().

Referenced by getSMRDEncodedLiteralOffset32(), and getSMRDEncodedOffset().

◆ createSlowPathCmp()

static Value * llvm::AMDGPU::createSlowPathCmp ( Module M,
IRBuilder<> &  IRB,
Type IntptrTy,
Value AddrLong,
Value ShadowValue,
uint32_t  TypeStoreSize,
int  AsanScale 
)
static

◆ decodeCustomOperand()

static bool llvm::AMDGPU::decodeCustomOperand ( const CustomOperandVal Opr,
int  Size,
unsigned  Code,
int &  Idx,
StringRef Name,
unsigned Val,
bool IsDefault,
const MCSubtargetInfo STI 
)
static

Definition at line 1581 of file AMDGPUBaseInfo.cpp.

References Idx, Name, and Size.

Referenced by llvm::AMDGPU::DepCtr::decodeDepCtr().

◆ decodeExpcnt()

unsigned llvm::AMDGPU::decodeExpcnt ( const IsaVersion Version,
unsigned  Waitcnt 
)
Returns
Decoded Expcnt from given Waitcnt for given isa Version.

Definition at line 1410 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by decodeWaitcnt().

◆ decodeFltRoundToHWConversionTable()

uint32_t llvm::AMDGPU::decodeFltRoundToHWConversionTable ( uint32_t  FltRounds)

Read the hardware rounding mode equivalent of a AMDGPUFltRounds value.

Definition at line 247 of file SIModeRegisterDefaults.cpp.

References FltRoundToHWConversionTable.

Referenced by llvm::SITargetLowering::lowerSET_ROUNDING().

◆ decodeLgkmcnt()

unsigned llvm::AMDGPU::decodeLgkmcnt ( const IsaVersion Version,
unsigned  Waitcnt 
)
Returns
Decoded Lgkmcnt from given Waitcnt for given isa Version.

Definition at line 1415 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by decodeWaitcnt().

◆ decodeLoadcntDscnt()

Waitcnt llvm::AMDGPU::decodeLoadcntDscnt ( const IsaVersion Version,
unsigned  LoadcntDscnt 
)
Returns
Decoded Waitcnt structure from given LoadcntDscnt for given isa Version.

Definition at line 1483 of file AMDGPUBaseInfo.cpp.

References llvm::AMDGPU::Waitcnt::DsCnt, llvm::AMDGPU::Waitcnt::LoadCnt, and llvm::Version.

◆ decodeStorecntDscnt()

Waitcnt llvm::AMDGPU::decodeStorecntDscnt ( const IsaVersion Version,
unsigned  StorecntDscnt 
)
Returns
Decoded Waitcnt structure from given StorecntDscnt for given isa Version.

Definition at line 1493 of file AMDGPUBaseInfo.cpp.

References llvm::AMDGPU::Waitcnt::DsCnt, llvm::AMDGPU::Waitcnt::StoreCnt, and llvm::Version.

◆ decodeVmcnt()

unsigned llvm::AMDGPU::decodeVmcnt ( const IsaVersion Version,
unsigned  Waitcnt 
)
Returns
Decoded Vmcnt from given Waitcnt for given isa Version.

Definition at line 1402 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by decodeWaitcnt().

◆ decodeWaitcnt() [1/2]

Waitcnt llvm::AMDGPU::decodeWaitcnt ( const IsaVersion Version,
unsigned  Encoded 
)

◆ decodeWaitcnt() [2/2]

void llvm::AMDGPU::decodeWaitcnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned Vmcnt,
unsigned Expcnt,
unsigned Lgkmcnt 
)

Decodes Vmcnt, Expcnt and Lgkmcnt from given Waitcnt for given isa Version, and writes decoded values into Vmcnt, Expcnt and Lgkmcnt respectively.

Should not be used on gfx12+, the instruction which needs it is deprecated

Vmcnt, Expcnt and Lgkmcnt are decoded as follows: Vmcnt = Waitcnt[3:0] (pre-gfx9) Vmcnt = Waitcnt[15:14,3:0] (gfx9,10) Vmcnt = Waitcnt[15:10] (gfx11) Expcnt = Waitcnt[6:4] (pre-gfx11) Expcnt = Waitcnt[2:0] (gfx11) Lgkmcnt = Waitcnt[11:8] (pre-gfx10) Lgkmcnt = Waitcnt[13:8] (gfx10) Lgkmcnt = Waitcnt[9:4] (gfx11)

Definition at line 1420 of file AMDGPUBaseInfo.cpp.

References decodeExpcnt(), decodeLgkmcnt(), decodeVmcnt(), and llvm::Version.

Referenced by llvm::AMDGPUInstPrinter::printSWaitCnt().

◆ eliminateConstantExprUsesOfLDSFromAllInstructions()

bool llvm::AMDGPU::eliminateConstantExprUsesOfLDSFromAllInstructions ( Module M)

◆ encodeCustomOperand()

static int llvm::AMDGPU::encodeCustomOperand ( const CustomOperandVal Opr,
int  Size,
const StringRef  Name,
int64_t  InputVal,
unsigned UsedOprMask,
const MCSubtargetInfo STI 
)
static

◆ encodeCustomOperandVal()

static int llvm::AMDGPU::encodeCustomOperandVal ( const CustomOperandVal Op,
int64_t  InputVal 
)
static

Definition at line 1598 of file AMDGPUBaseInfo.cpp.

References OPR_VAL_INVALID.

Referenced by encodeCustomOperand().

◆ encodeDscnt()

static unsigned llvm::AMDGPU::encodeDscnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Dscnt 
)
static

Definition at line 1515 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeLoadcntDscnt(), and encodeStorecntDscnt().

◆ encodeExpcnt()

unsigned llvm::AMDGPU::encodeExpcnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Expcnt 
)
Returns
Waitcnt with encoded Expcnt for given isa Version.

Definition at line 1444 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeWaitcnt().

◆ encodeLgkmcnt()

unsigned llvm::AMDGPU::encodeLgkmcnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Lgkmcnt 
)
Returns
Waitcnt with encoded Lgkmcnt for given isa Version.

Definition at line 1450 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeWaitcnt().

◆ encodeLoadcnt()

static unsigned llvm::AMDGPU::encodeLoadcnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Loadcnt 
)
static

Definition at line 1503 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeLoadcntDscnt().

◆ encodeLoadcntDscnt() [1/2]

unsigned llvm::AMDGPU::encodeLoadcntDscnt ( const IsaVersion Version,
const Waitcnt Decoded 
)
Returns
Loadcnt and Dscnt components of Decoded encoded as an immediate that can be used with S_WAIT_LOADCNT_DSCNT for given isa Version.

Definition at line 1529 of file AMDGPUBaseInfo.cpp.

References llvm::AMDGPU::Waitcnt::DsCnt, encodeLoadcntDscnt(), llvm::AMDGPU::Waitcnt::LoadCnt, and llvm::Version.

◆ encodeLoadcntDscnt() [2/2]

static unsigned llvm::AMDGPU::encodeLoadcntDscnt ( const IsaVersion Version,
unsigned  Loadcnt,
unsigned  Dscnt 
)
static

◆ encodeStorecnt()

static unsigned llvm::AMDGPU::encodeStorecnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Storecnt 
)
static

Definition at line 1509 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeStorecntDscnt().

◆ encodeStorecntDscnt() [1/2]

unsigned llvm::AMDGPU::encodeStorecntDscnt ( const IsaVersion Version,
const Waitcnt Decoded 
)
Returns
Storecnt and Dscnt components of Decoded encoded as an immediate that can be used with S_WAIT_STORECNT_DSCNT for given isa Version.

Definition at line 1541 of file AMDGPUBaseInfo.cpp.

References llvm::AMDGPU::Waitcnt::DsCnt, encodeStorecntDscnt(), llvm::AMDGPU::Waitcnt::StoreCnt, and llvm::Version.

◆ encodeStorecntDscnt() [2/2]

static unsigned llvm::AMDGPU::encodeStorecntDscnt ( const IsaVersion Version,
unsigned  Storecnt,
unsigned  Dscnt 
)
static

◆ encodeVmcnt()

unsigned llvm::AMDGPU::encodeVmcnt ( const IsaVersion Version,
unsigned  Waitcnt,
unsigned  Vmcnt 
)
Returns
Waitcnt with encoded Vmcnt for given isa Version.

Definition at line 1435 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeWaitcnt().

◆ encodeWaitcnt() [1/2]

unsigned llvm::AMDGPU::encodeWaitcnt ( const IsaVersion Version,
const Waitcnt Decoded 
)

◆ encodeWaitcnt() [2/2]

unsigned llvm::AMDGPU::encodeWaitcnt ( const IsaVersion Version,
unsigned  Vmcnt,
unsigned  Expcnt,
unsigned  Lgkmcnt 
)

Encodes Vmcnt, Expcnt and Lgkmcnt into Waitcnt for given isa Version.

Should not be used on gfx12+, the instruction which needs it is deprecated

Vmcnt, Expcnt and Lgkmcnt are encoded as follows: Waitcnt[2:0] = Expcnt (gfx11+) Waitcnt[3:0] = Vmcnt (pre-gfx9) Waitcnt[3:0] = Vmcnt[3:0] (gfx9,10) Waitcnt[6:4] = Expcnt (pre-gfx11) Waitcnt[9:4] = Lgkmcnt (gfx11) Waitcnt[11:8] = Lgkmcnt (pre-gfx10) Waitcnt[13:8] = Lgkmcnt (gfx10) Waitcnt[15:10] = Vmcnt (gfx11) Waitcnt[15:14] = Vmcnt[5:4] (gfx9,10)

Returns
Waitcnt with encoded Vmcnt, Expcnt and Lgkmcnt for given isa Version.

Definition at line 1456 of file AMDGPUBaseInfo.cpp.

References encodeExpcnt(), encodeLgkmcnt(), encodeVmcnt(), getWaitcntBitMask(), and llvm::Version.

Referenced by encodeWaitcnt().

◆ fillAMDGPUFeatureMap()

void llvm::AMDGPU::fillAMDGPUFeatureMap ( StringRef  GPU,
const Triple T,
StringMap< bool > &  Features 
)

◆ fillValidArchListAMDGCN()

void llvm::AMDGPU::fillValidArchListAMDGCN ( SmallVectorImpl< StringRef > &  Values)

◆ fillValidArchListR600()

void llvm::AMDGPU::fillValidArchListR600 ( SmallVectorImpl< StringRef > &  Values)

◆ foldAMDGPUMCExpr()

const MCExpr * llvm::AMDGPU::foldAMDGPUMCExpr ( const MCExpr Expr,
MCContext Ctx 
)

◆ genAMDGPUReportBlock()

static Instruction * llvm::AMDGPU::genAMDGPUReportBlock ( Module M,
IRBuilder<> &  IRB,
Value Cond,
bool  Recover 
)
static

◆ generateCrashCode()

static Instruction * llvm::AMDGPU::generateCrashCode ( Module M,
IRBuilder<> &  IRB,
Type IntptrTy,
Instruction InsertBefore,
Value Addr,
bool  IsWrite,
size_t  AccessSizeIndex,
Value SizeArgument,
bool  Recover 
)
static

◆ getAddr64Inst()

LLVM_READONLY int llvm::AMDGPU::getAddr64Inst ( uint16_t  Opcode)

◆ getAddrSizeMIMGOp()

LLVM_READONLY unsigned llvm::AMDGPU::getAddrSizeMIMGOp ( const MIMGBaseOpcodeInfo BaseOpcode,
const MIMGDimInfo Dim,
bool  IsA16,
bool  IsG16Supported 
)

◆ getAlign()

Align llvm::AMDGPU::getAlign ( const DataLayout DL,
const GlobalVariable GV 
)

◆ getAMDHSACodeObjectVersion() [1/2]

unsigned llvm::AMDGPU::getAMDHSACodeObjectVersion ( const Module M)

◆ getAMDHSACodeObjectVersion() [2/2]

unsigned llvm::AMDGPU::getAMDHSACodeObjectVersion ( unsigned  ABIVersion)

◆ getArchAttrAMDGCN()

unsigned llvm::AMDGPU::getArchAttrAMDGCN ( GPUKind  AK)

Definition at line 202 of file TargetParser.cpp.

References FEATURE_NONE.

◆ getArchAttrR600()

unsigned llvm::AMDGPU::getArchAttrR600 ( GPUKind  AK)

Definition at line 208 of file TargetParser.cpp.

References FEATURE_NONE.

◆ getArchFamilyNameAMDGCN()

StringRef llvm::AMDGPU::getArchFamilyNameAMDGCN ( GPUKind  AK)

◆ getArchNameAMDGCN()

StringRef llvm::AMDGPU::getArchNameAMDGCN ( GPUKind  AK)

◆ getArchNameR600()

StringRef llvm::AMDGPU::getArchNameR600 ( GPUKind  AK)

◆ getBaseWithConstantOffset()

std::pair< Register, unsigned > llvm::AMDGPU::getBaseWithConstantOffset ( MachineRegisterInfo MRI,
Register  Reg,
GISelKnownBits KnownBits = nullptr,
bool  CheckNUW = false 
)

◆ getBasicFromSDWAOp()

LLVM_READONLY int llvm::AMDGPU::getBasicFromSDWAOp ( uint16_t  Opcode)

◆ getBvhcntBitMask()

unsigned llvm::AMDGPU::getBvhcntBitMask ( const IsaVersion Version)
Returns
Bvhcnt bit mask for given isa Version. Returns 0 for versions that do not support BVHcnt

Definition at line 1366 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getCanBeVOPD()

LLVM_READONLY CanBeVOPD llvm::AMDGPU::getCanBeVOPD ( unsigned  Opc)

Definition at line 536 of file AMDGPUBaseInfo.cpp.

References Info.

Referenced by shouldScheduleVOPDAdjacent().

◆ getCanonicalArchName()

StringRef llvm::AMDGPU::getCanonicalArchName ( const Triple T,
StringRef  Arch 
)

◆ getCombinedCountBitMask()

static unsigned llvm::AMDGPU::getCombinedCountBitMask ( const IsaVersion Version,
bool  IsStore 
)
static

Definition at line 1469 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeLoadcntDscnt(), and encodeStorecntDscnt().

◆ getCommuteOrig()

LLVM_READONLY int llvm::AMDGPU::getCommuteOrig ( uint16_t  Opcode)

◆ getCommuteRev()

LLVM_READONLY int llvm::AMDGPU::getCommuteRev ( uint16_t  Opcode)

◆ getCompletionActionImplicitArgPosition()

unsigned llvm::AMDGPU::getCompletionActionImplicitArgPosition ( unsigned  CodeObjectVersion)

◆ getDefaultAMDHSACodeObjectVersion()

unsigned llvm::AMDGPU::getDefaultAMDHSACodeObjectVersion ( )
Returns
The default HSA code object version. This should only be used when we lack a more accurate CodeObjectVersion value (e.g. from the IR module flag or a .amdhsa_code_object_version directive)

Definition at line 182 of file AMDGPUBaseInfo.cpp.

References DefaultAMDHSACodeObjectVersion.

Referenced by getAMDHSACodeObjectVersion().

◆ getDefaultCustomOperandEncoding()

static unsigned llvm::AMDGPU::getDefaultCustomOperandEncoding ( const CustomOperandVal Opr,
int  Size,
const MCSubtargetInfo STI 
)
static

Definition at line 1550 of file AMDGPUBaseInfo.cpp.

References Idx, and Size.

Referenced by llvm::AMDGPU::DepCtr::getDefaultDepCtrEncoding().

◆ getDefaultQueueImplicitArgPosition()

unsigned llvm::AMDGPU::getDefaultQueueImplicitArgPosition ( unsigned  CodeObjectVersion)

◆ getDPPOp32()

LLVM_READONLY int llvm::AMDGPU::getDPPOp32 ( uint16_t  Opcode)

◆ getDPPOp64()

LLVM_READONLY int llvm::AMDGPU::getDPPOp64 ( uint16_t  Opcode)

◆ getDscntBitMask()

unsigned llvm::AMDGPU::getDscntBitMask ( const IsaVersion Version)
Returns
Dscnt bit mask for given isa Version. Returns 0 for versions that do not support DScnt

Definition at line 1378 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getELFABIVersion()

uint8_t llvm::AMDGPU::getELFABIVersion ( const Triple OS,
unsigned  CodeObjectVersion 
)
Returns
ABIVersion suitable for use in ELF's e_ident[EI_ABIVERSION].
Parameters
CodeObjectVersionis a value returned by getAMDHSACodeObjectVersion().

Definition at line 199 of file AMDGPUBaseInfo.cpp.

References llvm::Triple::AMDHSA, llvm::ELF::ELFABIVERSION_AMDGPU_HSA_V4, llvm::ELF::ELFABIVERSION_AMDGPU_HSA_V5, llvm::ELF::ELFABIVERSION_AMDGPU_HSA_V6, and llvm::report_fatal_error().

Referenced by llvm::AMDGPUTargetELFStreamer::finish().

◆ getEncodingFromOperandTable()

template<size_t N>
static int64_t llvm::AMDGPU::getEncodingFromOperandTable ( const CustomOperand(&)  Table[N],
StringRef  Name,
const MCSubtargetInfo STI 
)
static

Map from a symbolic name for a sendmsg/hwreg asm operand to it's encoding.

Definition at line 51 of file AMDGPUAsmUtils.cpp.

References Name, OPR_ID_UNKNOWN, and OPR_ID_UNSUPPORTED.

Referenced by llvm::AMDGPU::Hwreg::getHwregId(), llvm::AMDGPU::SendMsg::getMsgId(), and llvm::AMDGPU::SendMsg::getMsgOpId().

◆ getExpcntBitMask()

unsigned llvm::AMDGPU::getExpcntBitMask ( const IsaVersion Version)
Returns
Expcnt bit mask for given isa Version.

Definition at line 1370 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by llvm::AMDGPUInstPrinter::printSWaitCnt().

◆ getFlatScratchInstSSfromSV()

LLVM_READONLY int llvm::AMDGPU::getFlatScratchInstSSfromSV ( uint16_t  Opcode)
Returns
SS (SADDR) form of a FLAT Scratch instruction given an Opcode of an SV (VADDR) form.

◆ getFlatScratchInstSTfromSS()

LLVM_READONLY int llvm::AMDGPU::getFlatScratchInstSTfromSS ( uint16_t  Opcode)
Returns
ST form with only immediate offset of a FLAT Scratch instruction given an Opcode of an SS (SADDR) form.

Referenced by llvm::SIRegisterInfo::buildSpillLoadStore(), llvm::SIRegisterInfo::eliminateFrameIndex(), and getFlatScratchSpillOpcode().

◆ getFlatScratchInstSVfromSS()

LLVM_READONLY int llvm::AMDGPU::getFlatScratchInstSVfromSS ( uint16_t  Opcode)
Returns
SV (VADDR) form of a FLAT Scratch instruction given an Opcode of an SS (SADDR) form.

Referenced by llvm::SIRegisterInfo::buildSpillLoadStore(), getFlatScratchSpillOpcode(), and llvm::SIInstrInfo::moveFlatAddrToVGPR().

◆ getFlatScratchInstSVfromSVS()

LLVM_READONLY int llvm::AMDGPU::getFlatScratchInstSVfromSVS ( uint16_t  Opcode)
Returns
SV (VADDR) form of a FLAT Scratch instruction given an Opcode of an SVS (SADDR + VADDR) form.

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

◆ getGcnBufferFormatInfo() [1/2]

LLVM_READONLY const GcnBufferFormatInfo * llvm::AMDGPU::getGcnBufferFormatInfo ( uint8_t  BitsPerComp,
uint8_t  NumComponents,
uint8_t  NumFormat,
const MCSubtargetInfo STI 
)

Definition at line 2932 of file AMDGPUBaseInfo.cpp.

References isGFX10(), and isGFX11Plus().

Referenced by getBufferFormatWithCompCount().

◆ getGcnBufferFormatInfo() [2/2]

LLVM_READONLY const GcnBufferFormatInfo * llvm::AMDGPU::getGcnBufferFormatInfo ( uint8_t  Format,
const MCSubtargetInfo STI 
)

Definition at line 2945 of file AMDGPUBaseInfo.cpp.

References llvm::Format, isGFX10(), and isGFX11Plus().

◆ getGlobalSaddrOp()

LLVM_READONLY int llvm::AMDGPU::getGlobalSaddrOp ( uint16_t  Opcode)
Returns
SADDR form of a FLAT Global instruction given an Opcode of a VADDR form.

◆ getGlobalVaddrOp()

LLVM_READONLY int llvm::AMDGPU::getGlobalVaddrOp ( uint16_t  Opcode)
Returns
VADDR form of a FLAT Global instruction given an Opcode of a SADDR form.

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

◆ getHasColorExport()

bool llvm::AMDGPU::getHasColorExport ( const Function F)

Definition at line 1978 of file AMDGPUBaseInfo.cpp.

References llvm::CallingConv::AMDGPU_PS, and F.

Referenced by generateEndPgm().

◆ getHasDepthExport()

bool llvm::AMDGPU::getHasDepthExport ( const Function F)

Definition at line 1985 of file AMDGPUBaseInfo.cpp.

References F.

Referenced by generateEndPgm().

◆ getHostcallImplicitArgPosition()

unsigned llvm::AMDGPU::getHostcallImplicitArgPosition ( unsigned  COV)
Returns
The offset of the hostcall pointer argument from implicitarg_ptr

Definition at line 230 of file AMDGPUBaseInfo.cpp.

References AMDHSA_COV4, AMDHSA_COV5, AMDHSA_COV6, and llvm::AMDGPU::ImplicitArg::HOSTCALL_PTR_OFFSET.

◆ getIfAddr64Inst()

LLVM_READONLY int llvm::AMDGPU::getIfAddr64Inst ( uint16_t  Opcode)

Check if Opcode is an Addr64 opcode.

Returns
Opcode if it is an Addr64 opcode, otherwise -1.

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

◆ getImageDimIntrinsicByBaseOpcode()

const ImageDimIntrinsicInfo * llvm::AMDGPU::getImageDimIntrinsicByBaseOpcode ( unsigned  BaseOpcode,
unsigned  Dim 
)

◆ getImageDimIntrinsicInfo()

const ImageDimIntrinsicInfo * llvm::AMDGPU::getImageDimIntrinsicInfo ( unsigned  Intr)

◆ getInitialPSInputAddr()

unsigned llvm::AMDGPU::getInitialPSInputAddr ( const Function F)

Definition at line 1974 of file AMDGPUBaseInfo.cpp.

References F.

Referenced by llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().

◆ getInlineEncodingV216()

std::optional< unsigned > llvm::AMDGPU::getInlineEncodingV216 ( bool  IsFloat,
uint32_t  Literal 
)

◆ getInlineEncodingV2BF16()

LLVM_READNONE std::optional< unsigned > llvm::AMDGPU::getInlineEncodingV2BF16 ( uint32_t  Literal)

◆ getInlineEncodingV2F16()

LLVM_READNONE std::optional< unsigned > llvm::AMDGPU::getInlineEncodingV2F16 ( uint32_t  Literal)

◆ getInlineEncodingV2I16()

LLVM_READNONE std::optional< unsigned > llvm::AMDGPU::getInlineEncodingV2I16 ( uint32_t  Literal)

◆ getIntegerAttribute()

int llvm::AMDGPU::getIntegerAttribute ( const Function F,
StringRef  Name,
int  Default 
)
Returns
Integer value requested using F's Name attribute.
Default if attribute is not present.
Default and emits error if requested value cannot be converted to integer.

◆ getIntegerPairAttribute()

std::pair< unsigned, unsigned > llvm::AMDGPU::getIntegerPairAttribute ( const Function F,
StringRef  Name,
std::pair< unsigned, unsigned Default,
bool  OnlyFirstRequired = false 
)
Returns
A pair of integer values requested using F's Name attribute in "first[,second]" format ("second" is optional unless OnlyFirstRequired is false).
Default if attribute is not present.
Default and emits error if one of the requested values cannot be converted to integer, or OnlyFirstRequired is false and "second" value is not present.

Definition at line 1292 of file AMDGPUBaseInfo.cpp.

References A, llvm::Default, llvm::LLVMContext::emitError(), F, and Name.

Referenced by llvm::AMDGPUMachineFunction::AMDGPUMachineFunction(), llvm::AMDGPUSubtarget::getFlatWorkGroupSizes(), and llvm::AMDGPUSubtarget::getWavesPerEU().

◆ getIntegerVecAttribute()

SmallVector< unsigned > llvm::AMDGPU::getIntegerVecAttribute ( const Function F,
StringRef  Name,
unsigned  Size 
)
Returns
Generate a vector of integer values requested using F's Name attribute.
true if exactly Size (>2) number of integers are found in the attribute.
false if any error occurs.

Definition at line 1316 of file AMDGPUBaseInfo.cpp.

References A, assert(), llvm::Default, llvm::LLVMContext::emitError(), llvm::StringRef::empty(), F, Name, Size, and llvm::StringRef::split().

Referenced by llvm::AMDGPUSubtarget::getMaxNumWorkGroups().

◆ getInterestingMemoryOperands()

void llvm::AMDGPU::getInterestingMemoryOperands ( Module M,
Instruction I,
SmallVectorImpl< InterestingMemoryOperand > &  Interesting 
)

Get all the memory operands from the instruction that needs to be instrumented.

Definition at line 221 of file AMDGPUAsanInstrumentation.cpp.

References DL, llvm::SmallVectorImpl< T >::emplace_back(), llvm::VectorType::get(), I, Ptr, llvm::Align::value(), and llvm::MaybeAlign::valueOrOne().

◆ getIntrinsicID()

Intrinsic::ID llvm::AMDGPU::getIntrinsicID ( const MachineInstr I)

Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.

These opcodes have an Intrinsic::ID operand similar to a GIntrinsic. But they are not actual instances of GIntrinsics, so we cannot use GIntrinsic::getIntrinsicID() on them.

Definition at line 30 of file AMDGPUInstrInfo.cpp.

References I.

Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::AMDGPURegisterBankInfo::getInstrMapping(), and llvm::AMDGPUInstructionSelector::select().

◆ getIsaVersion()

AMDGPU::IsaVersion llvm::AMDGPU::getIsaVersion ( StringRef  GPU)

◆ getKmcntBitMask()

unsigned llvm::AMDGPU::getKmcntBitMask ( const IsaVersion Version)
Returns
Dscnt bit mask for given isa Version. Returns 0 for versions that do not support KMcnt

Definition at line 1382 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getLdsDwGranularity()

unsigned llvm::AMDGPU::getLdsDwGranularity ( const MCSubtargetInfo ST)
Returns
lds block size in terms of dwords. This is used to calculate the lds size encoded for PAL metadata 3.0+ which must be defined in terms of bytes.

Definition at line 2971 of file AMDGPUBaseInfo.cpp.

Referenced by EmitPALMetadataCommon().

◆ getLgkmcntBitMask()

unsigned llvm::AMDGPU::getLgkmcntBitMask ( const IsaVersion Version)
Returns
Lgkmcnt bit mask for given isa Version.

Definition at line 1374 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by llvm::AMDGPUInstPrinter::printSWaitCnt().

◆ getLoadcntBitMask()

unsigned llvm::AMDGPU::getLoadcntBitMask ( const IsaVersion Version)
Returns
Loadcnt bit mask for given isa Version. Returns 0 for versions that do not support LOADcnt

Definition at line 1358 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getMAIIsDGEMM()

LLVM_READONLY bool llvm::AMDGPU::getMAIIsDGEMM ( unsigned  Opc)

Returns true if MAI operation is a double precision GEMM.

Definition at line 518 of file AMDGPUBaseInfo.cpp.

References Info.

Referenced by isDGEMM().

◆ getMAIIsGFX940XDL()

LLVM_READONLY bool llvm::AMDGPU::getMAIIsGFX940XDL ( unsigned  Opc)

Definition at line 523 of file AMDGPUBaseInfo.cpp.

References Info.

Referenced by isXDL().

◆ getMaskedMIMGOp()

LLVM_READONLY int llvm::AMDGPU::getMaskedMIMGOp ( unsigned  Opc,
unsigned  NewChannels 
)

◆ getMaxNumUserSGPRs()

unsigned llvm::AMDGPU::getMaxNumUserSGPRs ( const MCSubtargetInfo STI)

◆ getMCOpcode()

LLVM_READONLY int llvm::AMDGPU::getMCOpcode ( uint16_t  Opcode,
unsigned  Gen 
)

Definition at line 645 of file AMDGPUBaseInfo.cpp.

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

◆ getMCReg()

unsigned llvm::AMDGPU::getMCReg ( unsigned  Reg,
const MCSubtargetInfo STI 
)

If Reg is a pseudo reg, return the correct hardware register given STI otherwise return Reg.

Definition at line 2297 of file AMDGPUBaseInfo.cpp.

References llvm::Triple::getArch(), llvm::MCSubtargetInfo::getTargetTriple(), MAP_REG2REG, llvm::Triple::r600, and Reg.

Referenced by llvm::AMDGPUDisassembler::createRegOperand(), and AMDGPUMCInstLower::lowerOperand().

◆ getMFMAEarlyClobberOp()

LLVM_READONLY int llvm::AMDGPU::getMFMAEarlyClobberOp ( uint16_t  Opcode)
Returns
earlyclobber version of a MAC MFMA is exists.

Referenced by llvm::SIInstrInfo::convertToThreeAddress(), and llvm::SIInstrInfo::pseudoToMCOpcode().

◆ getMIMGBaseOpcode()

LLVM_READONLY const MIMGBaseOpcodeInfo * llvm::AMDGPU::getMIMGBaseOpcode ( unsigned  Opc)

Definition at line 281 of file AMDGPUBaseInfo.cpp.

References getMIMGBaseOpcodeInfo(), getMIMGInfo(), and Info.

◆ getMIMGBaseOpcodeInfo()

LLVM_READONLY const MIMGBaseOpcodeInfo * llvm::AMDGPU::getMIMGBaseOpcodeInfo ( unsigned  BaseOpcode)

◆ getMIMGBiasMappingInfo()

LLVM_READONLY const MIMGBiasMappingInfo * llvm::AMDGPU::getMIMGBiasMappingInfo ( unsigned  Bias)

◆ getMIMGDimInfo()

LLVM_READONLY const MIMGDimInfo * llvm::AMDGPU::getMIMGDimInfo ( unsigned  DimEnum)

◆ getMIMGDimInfoByAsmSuffix()

LLVM_READONLY const MIMGDimInfo * llvm::AMDGPU::getMIMGDimInfoByAsmSuffix ( StringRef  AsmSuffix)

◆ getMIMGDimInfoByEncoding()

LLVM_READONLY const MIMGDimInfo * llvm::AMDGPU::getMIMGDimInfoByEncoding ( uint8_t  DimEnc)

◆ getMIMGG16MappingInfo()

LLVM_READONLY const MIMGG16MappingInfo * llvm::AMDGPU::getMIMGG16MappingInfo ( unsigned  G)

◆ getMIMGInfo()

LLVM_READONLY const MIMGInfo * llvm::AMDGPU::getMIMGInfo ( unsigned  Opc)

◆ getMIMGLZMappingInfo()

LLVM_READONLY const MIMGLZMappingInfo * llvm::AMDGPU::getMIMGLZMappingInfo ( unsigned  L)

◆ getMIMGMIPMappingInfo()

LLVM_READONLY const MIMGMIPMappingInfo * llvm::AMDGPU::getMIMGMIPMappingInfo ( unsigned  MIP)

◆ getMIMGOffsetMappingInfo()

LLVM_READONLY const MIMGOffsetMappingInfo * llvm::AMDGPU::getMIMGOffsetMappingInfo ( unsigned  Offset)

◆ getMIMGOpcode()

LLVM_READONLY int llvm::AMDGPU::getMIMGOpcode ( unsigned  BaseOpcode,
unsigned  MIMGEncoding,
unsigned  VDataDwords,
unsigned  VAddrDwords 
)

◆ getMinRedzoneSizeForGlobal()

static uint64_t llvm::AMDGPU::getMinRedzoneSizeForGlobal ( int  AsanScale)
static

Definition at line 24 of file AMDGPUAsanInstrumentation.cpp.

References getRedzoneSizeForScale().

Referenced by getRedzoneSizeForGlobal().

◆ getMTBUFBaseOpcode()

LLVM_READONLY int llvm::AMDGPU::getMTBUFBaseOpcode ( unsigned  Opc)

Definition at line 422 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMTBUFElements()

LLVM_READONLY int llvm::AMDGPU::getMTBUFElements ( unsigned  Opc)

Definition at line 432 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMTBUFHasSoffset()

LLVM_READONLY bool llvm::AMDGPU::getMTBUFHasSoffset ( unsigned  Opc)

Definition at line 447 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMTBUFHasSrsrc()

LLVM_READONLY bool llvm::AMDGPU::getMTBUFHasSrsrc ( unsigned  Opc)

Definition at line 442 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMTBUFHasVAddr()

LLVM_READONLY bool llvm::AMDGPU::getMTBUFHasVAddr ( unsigned  Opc)

Definition at line 437 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMTBUFOpcode()

LLVM_READONLY int llvm::AMDGPU::getMTBUFOpcode ( unsigned  BaseOpc,
unsigned  Elements 
)

Definition at line 427 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFBaseOpcode()

LLVM_READONLY int llvm::AMDGPU::getMUBUFBaseOpcode ( unsigned  Opc)

Definition at line 452 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFElements()

LLVM_READONLY int llvm::AMDGPU::getMUBUFElements ( unsigned  Opc)

Definition at line 462 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFHasSoffset()

LLVM_READONLY bool llvm::AMDGPU::getMUBUFHasSoffset ( unsigned  Opc)

Definition at line 477 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFHasSrsrc()

LLVM_READONLY bool llvm::AMDGPU::getMUBUFHasSrsrc ( unsigned  Opc)

Definition at line 472 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFHasVAddr()

LLVM_READONLY bool llvm::AMDGPU::getMUBUFHasVAddr ( unsigned  Opc)

Definition at line 467 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFIsBufferInv()

LLVM_READONLY bool llvm::AMDGPU::getMUBUFIsBufferInv ( unsigned  Opc)

Definition at line 482 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFOpcode()

LLVM_READONLY int llvm::AMDGPU::getMUBUFOpcode ( unsigned  BaseOpc,
unsigned  Elements 
)

Definition at line 457 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getMUBUFTfe()

LLVM_READONLY bool llvm::AMDGPU::getMUBUFTfe ( unsigned  Opc)

Definition at line 487 of file AMDGPUBaseInfo.cpp.

References Info.

Referenced by llvm::SITargetLowering::AddMemOpInit().

◆ getMultigridSyncArgImplicitArgPosition()

unsigned llvm::AMDGPU::getMultigridSyncArgImplicitArgPosition ( unsigned  COV)
Returns
The offset of the multigrid_sync_arg argument from implicitarg_ptr

Definition at line 216 of file AMDGPUBaseInfo.cpp.

References AMDHSA_COV4, AMDHSA_COV5, AMDHSA_COV6, and llvm::AMDGPU::ImplicitArg::MULTIGRID_SYNC_ARG_OFFSET.

◆ getNamedOperandIdx()

LLVM_READONLY int16_t llvm::AMDGPU::getNamedOperandIdx ( uint16_t  Opcode,
uint16_t  NamedIdx 
)

Referenced by llvm::SITargetLowering::AddMemOpInit(), addSrcModifiersAndSrc(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::SIInstrInfo::areLoadsFromSameBasePtr(), llvm::SIInstrInfo::buildShrunkInst(), llvm::SIRegisterInfo::buildSpillLoadStore(), collectVOPModifiers(), llvm::SIInstrInfo::commuteInstructionImpl(), llvm::AMDGPUDisassembler::convertDPP8Inst(), llvm::AMDGPUDisassembler::convertMIMGInst(), llvm::AMDGPUDisassembler::convertSDWAInst(), llvm::SIInstrInfo::convertToThreeAddress(), llvm::AMDGPUDisassembler::convertTrue16OpSel(), llvm::AMDGPUDisassembler::convertVOP3DPPInst(), cvtVOP3DstOpSelOnly(), decodeAVLdSt(), llvm::AMDGPUDisassembler::decodeVOPDDstYOp(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SIInstrInfo::enforceOperandRCAlignment(), llvm::SIInstrInfo::findCommutedOpIndices(), llvm::SIInstrInfo::foldImmediate(), llvm::SIRegisterInfo::getFrameIndexInstrOffset(), llvm::AMDGPUDisassembler::getInstruction(), llvm::SIInstrInfo::getInstSizeInBytes(), llvm::SIInstrInfo::getMemOperandsWithOffsetWidth(), llvm::SIInstrInfo::getNamedImmOperand(), llvm::SIInstrInfo::getNamedOperand(), llvm::SIInstrInfo::getRegClass(), llvm::SIRegisterInfo::getScratchInstrOffset(), getSrcOperandIndices(), hasAny64BitVGPROperands(), hasNamedOperand(), llvm::SIInstrWorklist::insert(), insertNamedMCOperand(), IsAGPROperand(), llvm::SIInstrInfo::isBufferSMRD(), llvm::SIInstrInfo::isImmOperandLegal(), llvm::AMDGPUDisassembler::isMacDPP(), llvm::SIInstrInfo::isOperandLegal(), isSendMsgTraceDataOrGDS(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::SIInstrInfo::legalizeOperandsVOP3(), AMDGPUMCInstLower::lower(), llvm::SIInstrInfo::moveFlatAddrToVGPR(), llvm::SIInstrInfo::moveToVALUImpl(), nodesHaveSameOperandValue(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), llvm::SIInstrInfo::removeModOperands(), updateOperandIfDifferent(), and llvm::SIInstrInfo::verifyInstruction().

◆ getNameFromOperandTable()

template<size_t N>
static StringRef llvm::AMDGPU::getNameFromOperandTable ( const CustomOperand(&)  Table[N],
unsigned  Encoding,
const MCSubtargetInfo STI 
)
static

Map from the encoding of a sendmsg/hwreg asm operand to it's name.

Definition at line 27 of file AMDGPUAsmUtils.cpp.

References Idx, N, and Name.

Referenced by llvm::AMDGPU::Hwreg::getHwreg(), llvm::AMDGPU::SendMsg::getMsgName(), and llvm::AMDGPU::SendMsg::getMsgOpName().

◆ getNSAMaxSize()

unsigned llvm::AMDGPU::getNSAMaxSize ( const MCSubtargetInfo STI,
bool  HasSampler 
)

◆ getNumFlatOffsetBits()

unsigned llvm::AMDGPU::getNumFlatOffsetBits ( const MCSubtargetInfo ST)

For pre-GFX12 FLAT instructions the offset must be positive; MSB is ignored and forced to zero.

Returns
The number of bits available for the signed offset field in flat instructions. Note that some forms of the instruction disallow negative offsets.

Definition at line 2894 of file AMDGPUBaseInfo.cpp.

References isGFX10(), and isGFX12().

Referenced by llvm::SIInstrInfo::isLegalFLATOffset(), and llvm::SIInstrInfo::splitFlatOffset().

◆ getOperandSize() [1/2]

LLVM_READNONE unsigned llvm::AMDGPU::getOperandSize ( const MCInstrDesc Desc,
unsigned  OpNo 
)
inline

Definition at line 1407 of file AMDGPUBaseInfo.h.

References getOperandSize().

◆ getOperandSize() [2/2]

LLVM_READNONE unsigned llvm::AMDGPU::getOperandSize ( const MCOperandInfo OpInfo)
inline

◆ getRedzoneSizeForGlobal()

uint64_t llvm::AMDGPU::getRedzoneSizeForGlobal ( int  AsanScale,
uint64_t  SizeInBytes 
)

Given SizeInBytes of the Value to be instrunmented, Returns the redzone size corresponding to it.

Definition at line 28 of file AMDGPUAsanInstrumentation.cpp.

References assert(), and getMinRedzoneSizeForGlobal().

◆ getRedzoneSizeForScale()

static uint64_t llvm::AMDGPU::getRedzoneSizeForScale ( int  AsanScale)
static

Definition at line 18 of file AMDGPUAsanInstrumentation.cpp.

Referenced by getMinRedzoneSizeForGlobal().

◆ getRegBitWidth() [1/3]

unsigned llvm::AMDGPU::getRegBitWidth ( const MCRegisterClass RC)

Get the size in bits of a register from the register class RC.

Definition at line 2536 of file AMDGPUBaseInfo.cpp.

References llvm::MCRegisterClass::getID(), and getRegBitWidth().

◆ getRegBitWidth() [2/3]

unsigned llvm::AMDGPU::getRegBitWidth ( const TargetRegisterClass RC)

◆ getRegBitWidth() [3/3]

unsigned llvm::AMDGPU::getRegBitWidth ( unsigned  RCID)

Get the size in bits of a register from the register class RC.

Definition at line 2397 of file AMDGPUBaseInfo.cpp.

References llvm_unreachable.

◆ getRegOperandSize()

unsigned llvm::AMDGPU::getRegOperandSize ( const MCRegisterInfo MRI,
const MCInstrDesc Desc,
unsigned  OpNo 
)

Get size of register operand.

Definition at line 2540 of file AMDGPUBaseInfo.cpp.

References assert(), and getRegBitWidth().

◆ getSamplecntBitMask()

unsigned llvm::AMDGPU::getSamplecntBitMask ( const IsaVersion Version)
Returns
Samplecnt bit mask for given isa Version. Returns 0 for versions that do not support SAMPLEcnt

Definition at line 1362 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getSDWAOp()

LLVM_READONLY int llvm::AMDGPU::getSDWAOp ( uint16_t  Opcode)

◆ getShiftMask()

constexpr std::pair< unsigned, unsigned > llvm::AMDGPU::getShiftMask ( unsigned  Value)
constexpr

Deduce the least significant bit aligned shift and mask values for a binary Complement Value (as they're defined in SIDefines.h as C_*) as a returned pair<shift, mask>.

That is to say Value == ~(mask << shift)

For example, given C_00B848_FWD_PROGRESS (i.e., 0x7FFFFFFF) from SIDefines.h, this will return the pair as (31,1).

Definition at line 27 of file SIDefinesUtils.h.

◆ getSMEMIsBuffer()

LLVM_READONLY bool llvm::AMDGPU::getSMEMIsBuffer ( unsigned  Opc)

Definition at line 492 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getSMRDEncodedLiteralOffset32()

std::optional< int64_t > llvm::AMDGPU::getSMRDEncodedLiteralOffset32 ( const MCSubtargetInfo ST,
int64_t  ByteOffset 
)
Returns
The encoding that can be used for a 32-bit literal offset in an SMRD instruction. This is only useful on CI.s

Definition at line 2884 of file AMDGPUBaseInfo.cpp.

References convertSMRDOffsetUnits(), isCI(), and isDwordAligned().

◆ getSMRDEncodedOffset()

std::optional< int64_t > llvm::AMDGPU::getSMRDEncodedOffset ( const MCSubtargetInfo ST,
int64_t  ByteOffset,
bool  IsBuffer,
bool  HasSOffset = false 
)
Returns
The encoding that will be used for ByteOffset in the SMRD offset field, or std::nullopt if it won't fit. On GFX9 and GFX10 S_LOAD instructions have a signed offset, on other subtargets it is unsigned. S_BUFFER has an unsigned offset for all subtargets.

Definition at line 2855 of file AMDGPUBaseInfo.cpp.

References assert(), convertSMRDOffsetUnits(), hasSMEMByteOffset(), hasSMRDSignedImmOffset(), isDwordAligned(), isGFX12Plus(), and isLegalSMRDEncodedUnsignedOffset().

◆ getSOPKOp()

LLVM_READONLY int llvm::AMDGPU::getSOPKOp ( uint16_t  Opcode)

◆ getSOPPWithRelaxation()

LLVM_READONLY int llvm::AMDGPU::getSOPPWithRelaxation ( uint16_t  Opcode)

◆ getStorecntBitMask()

unsigned llvm::AMDGPU::getStorecntBitMask ( const IsaVersion Version)
Returns
STOREcnt or VScnt bit mask for given isa Version. returns 0 for versions that do not support STOREcnt or VScnt. STOREcnt and VScnt are the same counter, the name used depends on the ISA version.

Definition at line 1386 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

◆ getTotalNumVGPRs()

int llvm::AMDGPU::getTotalNumVGPRs ( bool  has90AInsts,
int32_t  ArgNumAGPR,
int32_t  ArgNumVGPR 
)

◆ getTransitiveUsesOfLDS()

LDSUsesInfoTy llvm::AMDGPU::getTransitiveUsesOfLDS ( const CallGraph CG,
Module M 
)

◆ getUsesOfLDSByFunction()

void llvm::AMDGPU::getUsesOfLDSByFunction ( const CallGraph CG,
Module M,
FunctionVariableMap kernels,
FunctionVariableMap Functions 
)

◆ getVCMPXNoSDstOp()

LLVM_READONLY int llvm::AMDGPU::getVCMPXNoSDstOp ( uint16_t  Opcode)

◆ getVCMPXOpFromVCMP()

LLVM_READONLY int llvm::AMDGPU::getVCMPXOpFromVCMP ( uint16_t  Opcode)
Returns
v_cmpx version of a v_cmp instruction.

◆ getVmcntBitMask()

unsigned llvm::AMDGPU::getVmcntBitMask ( const IsaVersion Version)
Returns
Vmcnt bit mask for given isa Version.

Definition at line 1352 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by llvm::AMDGPUInstPrinter::printSWaitCnt().

◆ getVOP1IsSingle()

LLVM_READONLY bool llvm::AMDGPU::getVOP1IsSingle ( unsigned  Opc)

Definition at line 497 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getVOP2IsSingle()

LLVM_READONLY bool llvm::AMDGPU::getVOP2IsSingle ( unsigned  Opc)

Definition at line 502 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getVOP3IsSingle()

LLVM_READONLY bool llvm::AMDGPU::getVOP3IsSingle ( unsigned  Opc)

Definition at line 507 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getVOPDComponents()

LLVM_READONLY std::pair< unsigned, unsigned > llvm::AMDGPU::getVOPDComponents ( unsigned  VOPDOpcode)

Definition at line 655 of file AMDGPUBaseInfo.cpp.

References assert(), and Info.

Referenced by getVOPDInstInfo().

◆ getVOPDEncodingFamily()

LLVM_READONLY unsigned llvm::AMDGPU::getVOPDEncodingFamily ( const MCSubtargetInfo ST)
Returns
SIEncodingFamily used for VOPD encoding on a ST.

Definition at line 528 of file AMDGPUBaseInfo.cpp.

References llvm::SIEncodingFamily::GFX11, llvm::SIEncodingFamily::GFX12, and llvm_unreachable.

◆ getVOPDFull()

LLVM_READONLY int llvm::AMDGPU::getVOPDFull ( unsigned  OpX,
unsigned  OpY,
unsigned  EncodingFamily 
)

Definition at line 649 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getVOPDInstInfo() [1/2]

LLVM_READONLY VOPD::InstInfo llvm::AMDGPU::getVOPDInstInfo ( const MCInstrDesc OpX,
const MCInstrDesc OpY 
)

Definition at line 751 of file AMDGPUBaseInfo.cpp.

Referenced by llvm::checkVOPDRegConstraints().

◆ getVOPDInstInfo() [2/2]

LLVM_READONLY VOPD::InstInfo llvm::AMDGPU::getVOPDInstInfo ( unsigned  VOPDOpcode,
const MCInstrInfo InstrInfo 
)

◆ getVOPDOpcode()

LLVM_READONLY unsigned llvm::AMDGPU::getVOPDOpcode ( unsigned  Opc)

Definition at line 543 of file AMDGPUBaseInfo.cpp.

References Info.

◆ getVOPe32()

LLVM_READONLY int llvm::AMDGPU::getVOPe32 ( uint16_t  Opcode)

◆ getVOPe64()

LLVM_READONLY int llvm::AMDGPU::getVOPe64 ( uint16_t  Opcode)

◆ getWaitcntBitMask()

unsigned llvm::AMDGPU::getWaitcntBitMask ( const IsaVersion Version)
Returns
Waitcnt bit mask for given isa Version.

Definition at line 1390 of file AMDGPUBaseInfo.cpp.

References llvm::Version.

Referenced by encodeWaitcnt().

◆ hasA16()

bool llvm::AMDGPU::hasA16 ( const MCSubtargetInfo STI)

Definition at line 2066 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ hasAny64BitVGPROperands()

bool llvm::AMDGPU::hasAny64BitVGPROperands ( const MCInstrDesc OpDesc)
Returns
true if an instruction may have a 64-bit VGPR operand.

Definition at line 2952 of file AMDGPUBaseInfo.cpp.

References getNamedOperandIdx(), llvm::MCInstrDesc::getOpcode(), Idx, and llvm::MCInstrDesc::operands().

Referenced by isDPALU_DPP().

◆ hasArchitectedFlatScratch()

bool llvm::AMDGPU::hasArchitectedFlatScratch ( const MCSubtargetInfo STI)

◆ hasDPPSrc1SGPR()

bool llvm::AMDGPU::hasDPPSrc1SGPR ( const MCSubtargetInfo STI)

Definition at line 2214 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ hasG16()

bool llvm::AMDGPU::hasG16 ( const MCSubtargetInfo STI)

◆ hasGDS()

bool llvm::AMDGPU::hasGDS ( const MCSubtargetInfo STI)

◆ hasGFX10_3Insts()

bool llvm::AMDGPU::hasGFX10_3Insts ( const MCSubtargetInfo STI)

◆ hasKernargPreload()

unsigned llvm::AMDGPU::hasKernargPreload ( const MCSubtargetInfo STI)

◆ hasMAIInsts()

bool llvm::AMDGPU::hasMAIInsts ( const MCSubtargetInfo STI)

Definition at line 2206 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ hasMIMG_R128()

bool llvm::AMDGPU::hasMIMG_R128 ( const MCSubtargetInfo STI)

Definition at line 2062 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ hasNamedOperand()

LLVM_READONLY bool llvm::AMDGPU::hasNamedOperand ( uint64_t  Opcode,
uint64_t  NamedIdx 
)
inline

◆ hasPackedD16()

bool llvm::AMDGPU::hasPackedD16 ( const MCSubtargetInfo STI)

◆ hasSMEMByteOffset()

static bool llvm::AMDGPU::hasSMEMByteOffset ( const MCSubtargetInfo ST)
static

◆ hasSMRDSignedImmOffset()

bool llvm::AMDGPU::hasSMRDSignedImmOffset ( const MCSubtargetInfo ST)
Returns
true if the target supports signed immediate offset for SMRD instructions.

Definition at line 164 of file AMDGPUBaseInfo.cpp.

References isGFX9Plus().

Referenced by getSMRDEncodedOffset(), and isLegalSMRDEncodedSignedOffset().

◆ hasSRAMECC()

bool llvm::AMDGPU::hasSRAMECC ( const MCSubtargetInfo STI)

Definition at line 2058 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ hasVOPD()

bool llvm::AMDGPU::hasVOPD ( const MCSubtargetInfo STI)

◆ hasXNACK()

bool llvm::AMDGPU::hasXNACK ( const MCSubtargetInfo STI)

Definition at line 2054 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ initDefaultAMDKernelCodeT()

void llvm::AMDGPU::initDefaultAMDKernelCodeT ( AMDGPUMCKernelCodeT KernelCode,
const MCSubtargetInfo STI 
)

◆ insertWaveSizeFeature()

std::pair< FeatureError, StringRef > llvm::AMDGPU::insertWaveSizeFeature ( StringRef  GPU,
const Triple T,
StringMap< bool > &  Features 
)

◆ instrumentAddress()

void llvm::AMDGPU::instrumentAddress ( Module M,
IRBuilder<> &  IRB,
Instruction OrigIns,
Instruction InsertBefore,
Value Addr,
Align  Alignment,
TypeSize  TypeStoreSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
bool  Recover,
int  Scale,
int  Offset 
)

◆ instrumentAddressImpl()

static void llvm::AMDGPU::instrumentAddressImpl ( Module M,
IRBuilder<> &  IRB,
Instruction OrigIns,
Instruction InsertBefore,
Value Addr,
Align  Alignment,
uint32_t  TypeStoreSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
bool  Recover,
int  AsanScale,
int  AsanOffset 
)
static

◆ isArgPassedInSGPR() [1/2]

bool llvm::AMDGPU::isArgPassedInSGPR ( const Argument A)

◆ isArgPassedInSGPR() [2/2]

bool llvm::AMDGPU::isArgPassedInSGPR ( const CallBase CB,
unsigned  ArgNo 
)

◆ isChainCC()

LLVM_READNONE bool llvm::AMDGPU::isChainCC ( CallingConv::ID  CC)

◆ isCI()

bool llvm::AMDGPU::isCI ( const MCSubtargetInfo STI)

◆ isClobberedInFunction()

bool llvm::AMDGPU::isClobberedInFunction ( const LoadInst Load,
MemorySSA MSSA,
AAResults AA 
)

◆ isCompute()

LLVM_READNONE bool llvm::AMDGPU::isCompute ( CallingConv::ID  cc)

◆ isCvt_F32_Fp8_Bf8_e64()

LLVM_READNONE bool llvm::AMDGPU::isCvt_F32_Fp8_Bf8_e64 ( unsigned  Opc)

Definition at line 586 of file AMDGPUBaseInfo.cpp.

◆ isDPALU_DPP()

bool llvm::AMDGPU::isDPALU_DPP ( const MCInstrDesc OpDesc)
Returns
true if an instruction is a DP ALU DPP.

Definition at line 2967 of file AMDGPUBaseInfo.cpp.

References hasAny64BitVGPROperands().

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

◆ isDwordAligned()

static bool llvm::AMDGPU::isDwordAligned ( uint64_t  ByteOffset)
static

◆ isDynamicLDS()

bool llvm::AMDGPU::isDynamicLDS ( const GlobalVariable GV)

◆ isEntryFunctionCC()

LLVM_READNONE bool llvm::AMDGPU::isEntryFunctionCC ( CallingConv::ID  CC)

◆ isExtendedGlobalAddrSpace()

bool llvm::AMDGPU::isExtendedGlobalAddrSpace ( unsigned  AS)
inline

◆ isFlatGlobalAddrSpace()

bool llvm::AMDGPU::isFlatGlobalAddrSpace ( unsigned  AS)
inline

◆ isGCN3Encoding()

bool llvm::AMDGPU::isGCN3Encoding ( const MCSubtargetInfo STI)

Definition at line 2174 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

Referenced by hasSMEMByteOffset().

◆ isGenericAtomic()

LLVM_READNONE bool llvm::AMDGPU::isGenericAtomic ( unsigned  Opc)

◆ isGFX10()

bool llvm::AMDGPU::isGFX10 ( const MCSubtargetInfo STI)

◆ isGFX10_3_GFX11()

bool llvm::AMDGPU::isGFX10_3_GFX11 ( const MCSubtargetInfo STI)

Definition at line 2190 of file AMDGPUBaseInfo.cpp.

References isGFX10_BEncoding(), and isGFX12Plus().

◆ isGFX10_AEncoding()

bool llvm::AMDGPU::isGFX10_AEncoding ( const MCSubtargetInfo STI)

Definition at line 2178 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ isGFX10_BEncoding()

bool llvm::AMDGPU::isGFX10_BEncoding ( const MCSubtargetInfo STI)

Definition at line 2182 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

Referenced by isGFX10_3_GFX11(), and isGFX10Before1030().

◆ isGFX10_GFX11()

bool llvm::AMDGPU::isGFX10_GFX11 ( const MCSubtargetInfo STI)

Definition at line 2138 of file AMDGPUBaseInfo.cpp.

References isGFX10(), and isGFX11().

◆ isGFX10Before1030()

bool llvm::AMDGPU::isGFX10Before1030 ( const MCSubtargetInfo STI)

Definition at line 2170 of file AMDGPUBaseInfo.cpp.

References isGFX10(), and isGFX10_BEncoding().

◆ isGFX10Plus()

bool llvm::AMDGPU::isGFX10Plus ( const MCSubtargetInfo STI)

◆ isGFX11()

bool llvm::AMDGPU::isGFX11 ( const MCSubtargetInfo STI)

◆ isGFX11Plus()

bool llvm::AMDGPU::isGFX11Plus ( const MCSubtargetInfo STI)

◆ isGFX12()

bool llvm::AMDGPU::isGFX12 ( const MCSubtargetInfo STI)

Definition at line 2154 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::getFeatureBits().

Referenced by getNumFlatOffsetBits(), and isGFX12Plus().

◆ isGFX12Plus()

bool llvm::AMDGPU::isGFX12Plus ( const MCSubtargetInfo STI)

◆ isGFX8_GFX9_GFX10()

bool llvm::AMDGPU::isGFX8_GFX9_GFX10 ( const MCSubtargetInfo STI)

Definition at line 2120 of file AMDGPUBaseInfo.cpp.

References isGFX10(), isGFX9(), and isVI().

◆ isGFX8Plus()

bool llvm::AMDGPU::isGFX8Plus ( const MCSubtargetInfo STI)

Definition at line 2124 of file AMDGPUBaseInfo.cpp.

References isGFX9Plus(), and isVI().

◆ isGFX9()

bool llvm::AMDGPU::isGFX9 ( const MCSubtargetInfo STI)

◆ isGFX90A()

bool llvm::AMDGPU::isGFX90A ( const MCSubtargetInfo STI)

◆ isGFX940()

bool llvm::AMDGPU::isGFX940 ( const MCSubtargetInfo STI)

Definition at line 2198 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::hasFeature().

◆ isGFX9_GFX10()

bool llvm::AMDGPU::isGFX9_GFX10 ( const MCSubtargetInfo STI)

Definition at line 2112 of file AMDGPUBaseInfo.cpp.

References isGFX10(), and isGFX9().

◆ isGFX9_GFX10_GFX11()

bool llvm::AMDGPU::isGFX9_GFX10_GFX11 ( const MCSubtargetInfo STI)

Definition at line 2116 of file AMDGPUBaseInfo.cpp.

References isGFX10(), isGFX11(), and isGFX9().

◆ isGFX9Plus()

bool llvm::AMDGPU::isGFX9Plus ( const MCSubtargetInfo STI)

◆ isGlobalSegment()

bool llvm::AMDGPU::isGlobalSegment ( const GlobalValue GV)

◆ isGraphics()

LLVM_READNONE bool llvm::AMDGPU::isGraphics ( CallingConv::ID  cc)

◆ isGroupSegment()

bool llvm::AMDGPU::isGroupSegment ( const GlobalValue GV)

◆ isHi16Reg()

bool llvm::AMDGPU::isHi16Reg ( MCRegister  Reg,
const MCRegisterInfo MRI 
)
Returns
if Reg occupies the high 16-bits of a 32-bit register.

Definition at line 2236 of file AMDGPUBaseInfo.cpp.

References llvm::AMDGPU::HWEncoding::IS_HI16, MRI, and Reg.

Referenced by llvm::SIInstrInfo::copyPhysReg(), cvtVOP3DstOpSelOnly(), and llvm::SIRegisterInfo::SIRegisterInfo().

◆ isHsaAbi()

bool llvm::AMDGPU::isHsaAbi ( const MCSubtargetInfo STI)
Returns
True if STI is AMDHSA.

Definition at line 169 of file AMDGPUBaseInfo.cpp.

References llvm::Triple::AMDHSA, llvm::Triple::getOS(), and llvm::MCSubtargetInfo::getTargetTriple().

◆ isInlinableIntLiteral()

LLVM_READNONE bool llvm::AMDGPU::isInlinableIntLiteral ( int64_t  Literal)
inline

◆ isInlinableLiteral32()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteral32 ( int32_t  Literal,
bool  HasInv2Pi 
)

◆ isInlinableLiteral64()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteral64 ( int64_t  Literal,
bool  HasInv2Pi 
)

◆ isInlinableLiteralBF16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralBF16 ( int16_t  Literal,
bool  HasInv2Pi 
)

◆ isInlinableLiteralFP16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralFP16 ( int16_t  Literal,
bool  HasInv2Pi 
)

◆ isInlinableLiteralI16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralI16 ( int32_t  Literal,
bool  HasInv2Pi 
)

◆ isInlinableLiteralV216()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralV216 ( uint32_t  Literal,
uint8_t  OpType 
)

◆ isInlinableLiteralV2BF16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralV2BF16 ( uint32_t  Literal)

◆ isInlinableLiteralV2F16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralV2F16 ( uint32_t  Literal)

Definition at line 2752 of file AMDGPUBaseInfo.cpp.

References getInlineEncodingV2F16(), and llvm::Literal.

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

◆ isInlinableLiteralV2I16()

LLVM_READNONE bool llvm::AMDGPU::isInlinableLiteralV2I16 ( uint32_t  Literal)

Definition at line 2742 of file AMDGPUBaseInfo.cpp.

References getInlineEncodingV2I16(), and llvm::Literal.

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

◆ isInlineValue()

LLVM_READNONE bool llvm::AMDGPU::isInlineValue ( unsigned  Reg)

Definition at line 2317 of file AMDGPUBaseInfo.cpp.

References Reg.

◆ isIntrinsicAlwaysUniform()

bool llvm::AMDGPU::isIntrinsicAlwaysUniform ( unsigned  IntrID)

◆ isIntrinsicSourceOfDivergence()

bool llvm::AMDGPU::isIntrinsicSourceOfDivergence ( unsigned  IntrID)

◆ isInvalidSingleUseConsumerInst()

LLVM_READONLY bool llvm::AMDGPU::isInvalidSingleUseConsumerInst ( unsigned  Opc)

Definition at line 622 of file AMDGPUBaseInfo.cpp.

References Info.

◆ isInvalidSingleUseProducerInst()

LLVM_READONLY bool llvm::AMDGPU::isInvalidSingleUseProducerInst ( unsigned  Opc)

Definition at line 627 of file AMDGPUBaseInfo.cpp.

References Info.

◆ isKernel()

LLVM_READNONE bool llvm::AMDGPU::isKernel ( CallingConv::ID  CC)
inline

◆ isKernelCC()

bool llvm::AMDGPU::isKernelCC ( const Function Func)

Definition at line 2050 of file AMDGPUBaseInfo.cpp.

References isModuleEntryFunctionCC().

◆ isKernelLDS()

bool llvm::AMDGPU::isKernelLDS ( const Function F)

Definition at line 106 of file AMDGPUMemoryUtils.cpp.

References F, and isKernel().

Referenced by getTransitiveUsesOfLDS(), getUsesOfLDSByFunction(), and removeFnAttrFromReachable().

◆ isKImmOperand()

bool llvm::AMDGPU::isKImmOperand ( const MCInstrDesc Desc,
unsigned  OpNo 
)

Is this a KImm operand?

Definition at line 2353 of file AMDGPUBaseInfo.cpp.

References assert(), OPERAND_KIMM_FIRST, and OPERAND_KIMM_LAST.

◆ isLDSVariableToLower()

bool llvm::AMDGPU::isLDSVariableToLower ( const GlobalVariable GV)

◆ isLegalDPALU_DPPControl()

LLVM_READNONE bool llvm::AMDGPU::isLegalDPALU_DPPControl ( unsigned  DC)
inline

◆ isLegalSMRDEncodedSignedOffset()

LLVM_READONLY bool llvm::AMDGPU::isLegalSMRDEncodedSignedOffset ( const MCSubtargetInfo ST,
int64_t  EncodedOffset,
bool  IsBuffer 
)

Definition at line 2831 of file AMDGPUBaseInfo.cpp.

References hasSMRDSignedImmOffset(), and isGFX12Plus().

◆ isLegalSMRDEncodedUnsignedOffset()

LLVM_READONLY bool llvm::AMDGPU::isLegalSMRDEncodedUnsignedOffset ( const MCSubtargetInfo ST,
int64_t  EncodedOffset 
)

Definition at line 2822 of file AMDGPUBaseInfo.cpp.

References hasSMEMByteOffset(), and isGFX12Plus().

Referenced by getSMRDEncodedOffset().

◆ isLegalSMRDImmOffset()

bool llvm::AMDGPU::isLegalSMRDImmOffset ( const MCSubtargetInfo ST,
int64_t  ByteOffset 
)
Returns
true if this offset is small enough to fit in the SMRD offset field. ByteOffset should be the offset in bytes and not the encoded offset.

◆ isMAC()

LLVM_READNONE bool llvm::AMDGPU::isMAC ( unsigned  Opc)

Definition at line 552 of file AMDGPUBaseInfo.cpp.

Referenced by llvm::AMDGPUDisassembler::getInstruction().

◆ isModuleEntryFunctionCC()

LLVM_READNONE bool llvm::AMDGPU::isModuleEntryFunctionCC ( CallingConv::ID  CC)

Definition at line 2031 of file AMDGPUBaseInfo.cpp.

References llvm::CallingConv::AMDGPU_Gfx, CC, isChainCC(), and isEntryFunctionCC().

Referenced by isKernelCC().

◆ isNotGFX10Plus()

bool llvm::AMDGPU::isNotGFX10Plus ( const MCSubtargetInfo STI)

Definition at line 2166 of file AMDGPUBaseInfo.cpp.

References isCI(), isGFX9(), isSI(), and isVI().

◆ isNotGFX11Plus()

bool llvm::AMDGPU::isNotGFX11Plus ( const MCSubtargetInfo STI)

Definition at line 2162 of file AMDGPUBaseInfo.cpp.

References isGFX11Plus().

◆ isNotGFX12Plus()

bool llvm::AMDGPU::isNotGFX12Plus ( const MCSubtargetInfo STI)

Definition at line 2160 of file AMDGPUBaseInfo.cpp.

References isGFX12Plus().

◆ isNotGFX9Plus()

bool llvm::AMDGPU::isNotGFX9Plus ( const MCSubtargetInfo STI)

Definition at line 2132 of file AMDGPUBaseInfo.cpp.

References isGFX9Plus().

◆ isPermlane16()

LLVM_READNONE bool llvm::AMDGPU::isPermlane16 ( unsigned  Opc)

Definition at line 575 of file AMDGPUBaseInfo.cpp.

◆ isReadOnlySegment()

bool llvm::AMDGPU::isReadOnlySegment ( const GlobalValue GV)

◆ isReallyAClobber()

bool llvm::AMDGPU::isReallyAClobber ( const Value Ptr,
MemoryDef Def,
AAResults AA 
)

Given a Def clobbering a load from Ptr according to the MSSA check if this is actually a memory update or an artificial clobber to facilitate ordering constraints.

Definition at line 285 of file AMDGPUMemoryUtils.cpp.

References I, II, llvm::AAResults::isNoAlias(), and Ptr.

Referenced by isClobberedInFunction().

◆ isSGPR()

bool llvm::AMDGPU::isSGPR ( unsigned  Reg,
const MCRegisterInfo TRI 
)

Is Reg - scalar register.

Definition at line 2229 of file AMDGPUBaseInfo.cpp.

References llvm::MCRegisterClass::contains(), Reg, and TRI.

◆ isShader()

LLVM_READNONE bool llvm::AMDGPU::isShader ( CallingConv::ID  cc)

◆ isSI()

bool llvm::AMDGPU::isSI ( const MCSubtargetInfo STI)

◆ isSISrcFPOperand()

bool llvm::AMDGPU::isSISrcFPOperand ( const MCInstrDesc Desc,
unsigned  OpNo 
)

◆ isSISrcInlinableOperand()

bool llvm::AMDGPU::isSISrcInlinableOperand ( const MCInstrDesc Desc,
unsigned  OpNo 
)

Does this operand support only inlinable literals?

Definition at line 2386 of file AMDGPUBaseInfo.cpp.

References assert(), OPERAND_REG_INLINE_AC_FIRST, OPERAND_REG_INLINE_AC_LAST, OPERAND_REG_INLINE_C_FIRST, and OPERAND_REG_INLINE_C_LAST.

◆ isSISrcOperand()

bool llvm::AMDGPU::isSISrcOperand ( const MCInstrDesc Desc,
unsigned  OpNo 
)

Is this an AMDGPU specific source operand? These include registers, inline constants, literals and mandatory literals (KImm).

Definition at line 2346 of file AMDGPUBaseInfo.cpp.

References assert(), OPERAND_SRC_FIRST, and OPERAND_SRC_LAST.

Referenced by llvm::SIInstrInfo::isImmOperandLegal(), and llvm::SIInstrInfo::isOperandLegal().

◆ isSymbolicCustomOperandEncoding()

static bool llvm::AMDGPU::isSymbolicCustomOperandEncoding ( const CustomOperandVal Opr,
int  Size,
unsigned  Code,
bool HasNonDefaultVal,
const MCSubtargetInfo STI 
)
static

Definition at line 1562 of file AMDGPUBaseInfo.cpp.

References Idx, and Size.

Referenced by llvm::AMDGPU::DepCtr::isSymbolicDepCtrEncoding().

◆ isTrue16Inst()

LLVM_READONLY bool llvm::AMDGPU::isTrue16Inst ( unsigned  Opc)

Definition at line 617 of file AMDGPUBaseInfo.cpp.

References Info.

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

◆ isValid32BitLiteral()

LLVM_READNONE bool llvm::AMDGPU::isValid32BitLiteral ( uint64_t  Val,
bool  IsFP64 
)

◆ isVI()

bool llvm::AMDGPU::isVI ( const MCSubtargetInfo STI)

◆ isVOPC64DPP()

LLVM_READONLY bool llvm::AMDGPU::isVOPC64DPP ( unsigned  Opc)

Definition at line 512 of file AMDGPUBaseInfo.cpp.

Referenced by llvm::AMDGPUDisassembler::getInstruction().

◆ isVOPCAsmOnly()

LLVM_READONLY bool llvm::AMDGPU::isVOPCAsmOnly ( unsigned  Opc)

Definition at line 516 of file AMDGPUBaseInfo.cpp.

◆ isVOPD()

LLVM_READONLY bool llvm::AMDGPU::isVOPD ( unsigned  Opc)

Definition at line 548 of file AMDGPUBaseInfo.cpp.

References hasNamedOperand().

Referenced by getSrcOperandIndices().

◆ lookupD16ImageDimIntrinsic()

const D16ImageDimIntrinsic * llvm::AMDGPU::lookupD16ImageDimIntrinsic ( unsigned  Intr)

◆ lookupRsrcIntrinsic()

const RsrcIntrinsic * llvm::AMDGPU::lookupRsrcIntrinsic ( unsigned  Intr)

◆ mapWMMA2AddrTo3AddrOpcode()

LLVM_READONLY unsigned llvm::AMDGPU::mapWMMA2AddrTo3AddrOpcode ( unsigned  Opc)

Definition at line 632 of file AMDGPUBaseInfo.cpp.

References Info.

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

◆ mapWMMA3AddrTo2AddrOpcode()

LLVM_READONLY unsigned llvm::AMDGPU::mapWMMA3AddrTo2AddrOpcode ( unsigned  Opc)

Definition at line 637 of file AMDGPUBaseInfo.cpp.

References Info.

◆ maskShiftGet()

const MCExpr * llvm::AMDGPU::maskShiftGet ( const MCExpr Val,
uint32_t  Mask,
uint32_t  Shift,
MCContext Ctx 
)
inline

Provided with the MCExpr * Val, uint32 Mask and Shift, will return the right shifted and masked, in said order of operations, MCExpr * created within the MCContext Ctx.

For example, given MCExpr *Val, Mask == 0xf, Shift == 6 the returned MCExpr

  • will be the equivalent of (Val >> 6) & 0xf

Definition at line 63 of file SIDefinesUtils.h.

References llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAnd(), and llvm::MCBinaryExpr::createLShr().

◆ maskShiftSet()

const MCExpr * llvm::AMDGPU::maskShiftSet ( const MCExpr Val,
uint32_t  Mask,
uint32_t  Shift,
MCContext Ctx 
)
inline

Provided with the MCExpr * Val, uint32 Mask and Shift, will return the masked and left shifted, in said order of operations, MCExpr * created within the MCContext Ctx.

For example, given MCExpr *Val, Mask == 0xf, Shift == 6 the returned MCExpr

  • will be the equivalent of (Val & 0xf) << 6

Definition at line 44 of file SIDefinesUtils.h.

References llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAnd(), and llvm::MCBinaryExpr::createShl().

Referenced by llvm::AMDGPU::AMDGPUMCKernelCodeT::EmitKernelCodeT().

◆ mc2PseudoReg()

LLVM_READNONE unsigned llvm::AMDGPU::mc2PseudoReg ( unsigned  Reg)

Convert hardware register Reg to a pseudo register.

Definition at line 2313 of file AMDGPUBaseInfo.cpp.

References MAP_REG2REG.

Referenced by checkWriteLane().

◆ memToShadow()

static Value * llvm::AMDGPU::memToShadow ( Module M,
IRBuilder<> &  IRB,
Type IntptrTy,
Value Shadow,
int  AsanScale,
uint32_t  AsanOffset 
)
static

◆ parseArchAMDGCN()

AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN ( StringRef  CPU)

◆ parseArchR600()

AMDGPU::GPUKind llvm::AMDGPU::parseArchR600 ( StringRef  CPU)

◆ printAMDGPUMCExpr()

void llvm::AMDGPU::printAMDGPUMCExpr ( const MCExpr Expr,
raw_ostream OS,
const MCAsmInfo MAI 
)

◆ removeFnAttrFromReachable()

void llvm::AMDGPU::removeFnAttrFromReachable ( CallGraph CG,
Function KernelRoot,
ArrayRef< StringRef FnAttrs 
)

◆ shouldEmitConstantsToTextSection()

bool llvm::AMDGPU::shouldEmitConstantsToTextSection ( const Triple TT)
Returns
True if constants should be emitted to .text section for given target triple TT, false otherwise.

Definition at line 1287 of file AMDGPUBaseInfo.cpp.

References llvm::Triple::r600.

Referenced by llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), and llvm::SITargetLowering::shouldEmitFixup().

◆ TypeStoreSizeToSizeIndex()

static size_t llvm::AMDGPU::TypeStoreSizeToSizeIndex ( uint32_t  TypeSize)
static

Definition at line 52 of file AMDGPUAsanInstrumentation.cpp.

References llvm::countr_zero().

Referenced by instrumentAddressImpl().

Variable Documentation

◆ ExtendedFltRoundOffset

constexpr uint32_t llvm::AMDGPU::ExtendedFltRoundOffset = 4
staticconstexpr

Offset of nonstandard values for llvm.get.rounding results from the largest supported mode.

Definition at line 135 of file SIModeRegisterDefaults.h.

Referenced by decodeFltRoundToHWConversionTable(), decodeIndexFltRoundConversionTable(), encodeFltRoundsTable(), encodeFltRoundsToHWTable(), and encodeFltRoundsToHWTableSame().

◆ F32FltRoundOffset

constexpr uint32_t llvm::AMDGPU::F32FltRoundOffset = 0
staticconstexpr

Offset in mode register of f32 rounding mode.

Definition at line 138 of file SIModeRegisterDefaults.h.

Referenced by getModeRegisterRoundMode().

◆ F64FltRoundOffset

constexpr uint32_t llvm::AMDGPU::F64FltRoundOffset = 2
staticconstexpr

Offset in mode register of f64/f16 rounding mode.

Definition at line 141 of file SIModeRegisterDefaults.h.

Referenced by getModeRegisterRoundMode().

◆ FltRoundConversionTable

const uint64_t llvm::AMDGPU::FltRoundConversionTable
extern

◆ FltRoundToHWConversionTable

const uint64_t llvm::AMDGPU::FltRoundToHWConversionTable
extern

◆ OPR_ID_DUPLICATE

const int llvm::AMDGPU::OPR_ID_DUPLICATE = -3

Definition at line 25 of file AMDGPUAsmUtils.h.

Referenced by encodeCustomOperand().

◆ OPR_ID_UNKNOWN

const int llvm::AMDGPU::OPR_ID_UNKNOWN = -1

Definition at line 23 of file AMDGPUAsmUtils.h.

Referenced by encodeCustomOperand(), and getEncodingFromOperandTable().

◆ OPR_ID_UNSUPPORTED

const int llvm::AMDGPU::OPR_ID_UNSUPPORTED = -2

Definition at line 24 of file AMDGPUAsmUtils.h.

Referenced by encodeCustomOperand(), and getEncodingFromOperandTable().

◆ OPR_VAL_INVALID

const int llvm::AMDGPU::OPR_VAL_INVALID = -4

Definition at line 26 of file AMDGPUAsmUtils.h.

Referenced by encodeCustomOperandVal().

◆ RSRC_DATA_FORMAT

const uint64_t llvm::AMDGPU::RSRC_DATA_FORMAT = 0xf00000000000LL

Definition at line 1571 of file SIInstrInfo.h.

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

◆ RSRC_ELEMENT_SIZE_SHIFT

const uint64_t llvm::AMDGPU::RSRC_ELEMENT_SIZE_SHIFT = (32 + 19)

Definition at line 1572 of file SIInstrInfo.h.

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

◆ RSRC_INDEX_STRIDE_SHIFT

const uint64_t llvm::AMDGPU::RSRC_INDEX_STRIDE_SHIFT = (32 + 21)

Definition at line 1573 of file SIInstrInfo.h.

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

◆ RSRC_TID_ENABLE

const uint64_t llvm::AMDGPU::RSRC_TID_ENABLE = UINT64_C(1) << (32 + 23)

Definition at line 1574 of file SIInstrInfo.h.

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