LLVM 20.0.0git
Classes | Namespaces | Enumerations | Functions | Variables
AMDGPUMetadata.h File Reference

AMDGPU metadata definitions and in-memory representations. More...

#include "llvm/ADT/StringRef.h"
#include <cstdint>
#include <string>
#include <system_error>
#include <vector>

Go to the source code of this file.

Classes

struct  llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata
 In-memory representation of kernel attributes metadata. More...
 
struct  llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata
 In-memory representation of kernel argument metadata. More...
 
struct  llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata
 In-memory representation of kernel code properties metadata. More...
 
struct  llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata
 In-memory representation of kernel debug properties metadata. More...
 
struct  llvm::AMDGPU::HSAMD::Kernel::Metadata
 In-memory representation of kernel metadata. More...
 
struct  llvm::AMDGPU::HSAMD::Metadata
 In-memory representation of HSA metadata. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::AMDGPU
 
namespace  llvm::AMDGPU::HSAMD
 
namespace  llvm::AMDGPU::HSAMD::Kernel
 
namespace  llvm::AMDGPU::HSAMD::Kernel::Attrs
 
namespace  llvm::AMDGPU::HSAMD::Kernel::Attrs::Key
 
namespace  llvm::AMDGPU::HSAMD::Kernel::Arg
 
namespace  llvm::AMDGPU::HSAMD::Kernel::Arg::Key
 
namespace  llvm::AMDGPU::HSAMD::Kernel::CodeProps
 
namespace  llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key
 
namespace  llvm::AMDGPU::HSAMD::Kernel::DebugProps
 
namespace  llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key
 
namespace  llvm::AMDGPU::HSAMD::Kernel::Key
 
namespace  llvm::AMDGPU::HSAMD::Key
 
namespace  llvm::AMDGPU::HSAMD::V3
 
namespace  llvm::AMDGPU::PALMD
 

Enumerations

enum class  llvm::AMDGPU::HSAMD::AccessQualifier : uint8_t {
  llvm::AMDGPU::HSAMD::Default = 0 , llvm::AMDGPU::HSAMD::ReadOnly = 1 , llvm::AMDGPU::HSAMD::WriteOnly = 2 , llvm::AMDGPU::HSAMD::ReadWrite = 3 ,
  llvm::AMDGPU::HSAMD::Unknown = 0xff
}
 Access qualifiers. More...
 
enum class  llvm::AMDGPU::HSAMD::AddressSpaceQualifier : uint8_t {
  llvm::AMDGPU::HSAMD::Private = 0 , llvm::AMDGPU::HSAMD::Global = 1 , llvm::AMDGPU::HSAMD::Constant = 2 , llvm::AMDGPU::HSAMD::Local = 3 ,
  llvm::AMDGPU::HSAMD::Generic = 4 , llvm::AMDGPU::HSAMD::Region = 5 , llvm::AMDGPU::HSAMD::Unknown = 0xff
}
 Address space qualifiers. More...
 
enum class  llvm::AMDGPU::HSAMD::ValueKind : uint8_t {
  llvm::AMDGPU::HSAMD::ByValue = 0 , llvm::AMDGPU::HSAMD::GlobalBuffer = 1 , llvm::AMDGPU::HSAMD::DynamicSharedPointer = 2 , llvm::AMDGPU::HSAMD::Sampler = 3 ,
  llvm::AMDGPU::HSAMD::Image = 4 , llvm::AMDGPU::HSAMD::Pipe = 5 , llvm::AMDGPU::HSAMD::Queue = 6 , llvm::AMDGPU::HSAMD::HiddenGlobalOffsetX = 7 ,
  llvm::AMDGPU::HSAMD::HiddenGlobalOffsetY = 8 , llvm::AMDGPU::HSAMD::HiddenGlobalOffsetZ = 9 , llvm::AMDGPU::HSAMD::HiddenNone = 10 , llvm::AMDGPU::HSAMD::HiddenPrintfBuffer = 11 ,
  llvm::AMDGPU::HSAMD::HiddenDefaultQueue = 12 , llvm::AMDGPU::HSAMD::HiddenCompletionAction = 13 , llvm::AMDGPU::HSAMD::HiddenMultiGridSyncArg = 14 , llvm::AMDGPU::HSAMD::HiddenHostcallBuffer = 15 ,
  llvm::AMDGPU::HSAMD::Unknown = 0xff
}
 Value kinds. More...
 
enum class  llvm::AMDGPU::HSAMD::ValueType : uint8_t {
  llvm::AMDGPU::HSAMD::Struct = 0 , llvm::AMDGPU::HSAMD::I8 = 1 , llvm::AMDGPU::HSAMD::U8 = 2 , llvm::AMDGPU::HSAMD::I16 = 3 ,
  llvm::AMDGPU::HSAMD::U16 = 4 , llvm::AMDGPU::HSAMD::F16 = 5 , llvm::AMDGPU::HSAMD::I32 = 6 , llvm::AMDGPU::HSAMD::U32 = 7 ,
  llvm::AMDGPU::HSAMD::F32 = 8 , llvm::AMDGPU::HSAMD::I64 = 9 , llvm::AMDGPU::HSAMD::U64 = 10 , llvm::AMDGPU::HSAMD::F64 = 11 ,
  llvm::AMDGPU::HSAMD::Unknown = 0xff
}
 Value types. More...
 
enum  llvm::AMDGPU::PALMD::Key : uint32_t {
  llvm::AMDGPU::PALMD::R_2E12_COMPUTE_PGM_RSRC1 = 0x2e12 , llvm::AMDGPU::PALMD::R_2D4A_SPI_SHADER_PGM_RSRC1_LS = 0x2d4a , llvm::AMDGPU::PALMD::R_2D0A_SPI_SHADER_PGM_RSRC1_HS = 0x2d0a , llvm::AMDGPU::PALMD::R_2CCA_SPI_SHADER_PGM_RSRC1_ES = 0x2cca ,
  llvm::AMDGPU::PALMD::R_2C8A_SPI_SHADER_PGM_RSRC1_GS = 0x2c8a , llvm::AMDGPU::PALMD::R_2C4A_SPI_SHADER_PGM_RSRC1_VS = 0x2c4a , llvm::AMDGPU::PALMD::R_2C0A_SPI_SHADER_PGM_RSRC1_PS = 0x2c0a , llvm::AMDGPU::PALMD::R_2E00_COMPUTE_DISPATCH_INITIATOR = 0x2e00 ,
  llvm::AMDGPU::PALMD::R_A1B3_SPI_PS_INPUT_ENA = 0xa1b3 , llvm::AMDGPU::PALMD::R_A1B4_SPI_PS_INPUT_ADDR = 0xa1b4 , llvm::AMDGPU::PALMD::R_A1B6_SPI_PS_IN_CONTROL = 0xa1b6 , llvm::AMDGPU::PALMD::R_A2D5_VGT_SHADER_STAGES_EN = 0xa2d5 ,
  llvm::AMDGPU::PALMD::LS_NUM_USED_VGPRS = 0x10000021 , llvm::AMDGPU::PALMD::HS_NUM_USED_VGPRS = 0x10000022 , llvm::AMDGPU::PALMD::ES_NUM_USED_VGPRS = 0x10000023 , llvm::AMDGPU::PALMD::GS_NUM_USED_VGPRS = 0x10000024 ,
  llvm::AMDGPU::PALMD::VS_NUM_USED_VGPRS = 0x10000025 , llvm::AMDGPU::PALMD::PS_NUM_USED_VGPRS = 0x10000026 , llvm::AMDGPU::PALMD::CS_NUM_USED_VGPRS = 0x10000027 , llvm::AMDGPU::PALMD::LS_NUM_USED_SGPRS = 0x10000028 ,
  llvm::AMDGPU::PALMD::HS_NUM_USED_SGPRS = 0x10000029 , llvm::AMDGPU::PALMD::ES_NUM_USED_SGPRS = 0x1000002a , llvm::AMDGPU::PALMD::GS_NUM_USED_SGPRS = 0x1000002b , llvm::AMDGPU::PALMD::VS_NUM_USED_SGPRS = 0x1000002c ,
  llvm::AMDGPU::PALMD::PS_NUM_USED_SGPRS = 0x1000002d , llvm::AMDGPU::PALMD::CS_NUM_USED_SGPRS = 0x1000002e , llvm::AMDGPU::PALMD::LS_SCRATCH_SIZE = 0x10000044 , llvm::AMDGPU::PALMD::HS_SCRATCH_SIZE = 0x10000045 ,
  llvm::AMDGPU::PALMD::ES_SCRATCH_SIZE = 0x10000046 , llvm::AMDGPU::PALMD::GS_SCRATCH_SIZE = 0x10000047 , llvm::AMDGPU::PALMD::VS_SCRATCH_SIZE = 0x10000048 , llvm::AMDGPU::PALMD::PS_SCRATCH_SIZE = 0x10000049 ,
  llvm::AMDGPU::PALMD::CS_SCRATCH_SIZE = 0x1000004a
}
 PAL metadata keys. More...
 

Functions

std::error_code llvm::AMDGPU::HSAMD::fromString (StringRef String, Metadata &HSAMetadata)
 Converts String to HSAMetadata.
 
std::error_code llvm::AMDGPU::HSAMD::toString (Metadata HSAMetadata, std::string &String)
 Converts HSAMetadata to String.
 

Variables

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV3 = 1
 HSA metadata major version for code object V3.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV3 = 0
 HSA metadata minor version for code object V3.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV4 = 1
 HSA metadata major version for code object V4.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV4 = 1
 HSA metadata minor version for code object V4.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV5 = 1
 HSA metadata major version for code object V5.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV5 = 2
 HSA metadata minor version for code object V5.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV6 = 1
 HSA metadata major version for code object V6.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV6 = 2
 HSA metadata minor version for code object V6.
 
constexpr char llvm::AMDGPU::HSAMD::AssemblerDirectiveBegin [] = ".amd_amdgpu_hsa_metadata"
 Old HSA metadata beginning assembler directive for V2.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::ReqdWorkGroupSize [] = "ReqdWorkGroupSize"
 Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::WorkGroupSizeHint [] = "WorkGroupSizeHint"
 Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::VecTypeHint [] = "VecTypeHint"
 Key for Kernel::Attr::Metadata::mVecTypeHint.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::RuntimeHandle [] = "RuntimeHandle"
 Key for Kernel::Attr::Metadata::mRuntimeHandle.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Name [] = "Name"
 Key for Kernel::Arg::Metadata::mName.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::TypeName [] = "TypeName"
 Key for Kernel::Arg::Metadata::mTypeName.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size [] = "Size"
 Key for Kernel::Arg::Metadata::mSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Offset [] = "Offset"
 Key for Kernel::Arg::Metadata::mOffset.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align [] = "Align"
 Key for Kernel::Arg::Metadata::mAlign.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::ValueKind [] = "ValueKind"
 Key for Kernel::Arg::Metadata::mValueKind.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::ValueType [] = "ValueType"
 Key for Kernel::Arg::Metadata::mValueType. (deprecated)
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::PointeeAlign [] = "PointeeAlign"
 Key for Kernel::Arg::Metadata::mPointeeAlign.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::AddrSpaceQual [] = "AddrSpaceQual"
 Key for Kernel::Arg::Metadata::mAddrSpaceQual.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::AccQual [] = "AccQual"
 Key for Kernel::Arg::Metadata::mAccQual.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::ActualAccQual [] = "ActualAccQual"
 Key for Kernel::Arg::Metadata::mActualAccQual.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsConst [] = "IsConst"
 Key for Kernel::Arg::Metadata::mIsConst.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsRestrict [] = "IsRestrict"
 Key for Kernel::Arg::Metadata::mIsRestrict.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile [] = "IsVolatile"
 Key for Kernel::Arg::Metadata::mIsVolatile.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsPipe [] = "IsPipe"
 Key for Kernel::Arg::Metadata::mIsPipe.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::KernargSegmentSize [] = "KernargSegmentSize"
 Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::GroupSegmentFixedSize [] = "GroupSegmentFixedSize"
 Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::PrivateSegmentFixedSize [] = "PrivateSegmentFixedSize"
 Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::KernargSegmentAlign [] = "KernargSegmentAlign"
 Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::WavefrontSize [] = "WavefrontSize"
 Key for Kernel::CodeProps::Metadata::mWavefrontSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSGPRs [] = "NumSGPRs"
 Key for Kernel::CodeProps::Metadata::mNumSGPRs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumVGPRs [] = "NumVGPRs"
 Key for Kernel::CodeProps::Metadata::mNumVGPRs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::MaxFlatWorkGroupSize [] = "MaxFlatWorkGroupSize"
 Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::IsDynamicCallStack [] = "IsDynamicCallStack"
 Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::IsXNACKEnabled [] = "IsXNACKEnabled"
 Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSpilledSGPRs [] = "NumSpilledSGPRs"
 Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSpilledVGPRs [] = "NumSpilledVGPRs"
 Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::DebuggerABIVersion [] = "DebuggerABIVersion"
 Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::ReservedNumVGPRs [] = "ReservedNumVGPRs"
 Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::ReservedFirstVGPR [] = "ReservedFirstVGPR"
 Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::PrivateSegmentBufferSGPR [] = "PrivateSegmentBufferSGPR"
 Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::WavefrontPrivateSegmentOffsetSGPR []
 Key for Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::Name [] = "Name"
 Key for Kernel::Metadata::mName.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName [] = "SymbolName"
 Key for Kernel::Metadata::mSymbolName.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::Language [] = "Language"
 Key for Kernel::Metadata::mLanguage.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::LanguageVersion [] = "LanguageVersion"
 Key for Kernel::Metadata::mLanguageVersion.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::Attrs [] = "Attrs"
 Key for Kernel::Metadata::mAttrs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::Args [] = "Args"
 Key for Kernel::Metadata::mArgs.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::CodeProps [] = "CodeProps"
 Key for Kernel::Metadata::mCodeProps.
 
constexpr char llvm::AMDGPU::HSAMD::Kernel::Key::DebugProps [] = "DebugProps"
 Key for Kernel::Metadata::mDebugProps.
 
constexpr char llvm::AMDGPU::HSAMD::Key::Version [] = "Version"
 Key for HSA::Metadata::mVersion.
 
constexpr char llvm::AMDGPU::HSAMD::Key::Printf [] = "Printf"
 Key for HSA::Metadata::mPrintf.
 
constexpr char llvm::AMDGPU::HSAMD::Key::Kernels [] = "Kernels"
 Key for HSA::Metadata::mKernels.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::V3::VersionMajor = 1
 HSA metadata major version.
 
constexpr uint32_t llvm::AMDGPU::HSAMD::V3::VersionMinor = 0
 HSA metadata minor version.
 
constexpr char llvm::AMDGPU::HSAMD::V3::AssemblerDirectiveBegin [] = ".amdgpu_metadata"
 HSA metadata beginning assembler directive.
 
constexpr char llvm::AMDGPU::HSAMD::V3::AssemblerDirectiveEnd [] = ".end_amdgpu_metadata"
 HSA metadata ending assembler directive.
 
constexpr char llvm::AMDGPU::PALMD::AssemblerDirective [] = ".amd_amdgpu_pal_metadata"
 PAL metadata (old linear format) assembler directive.
 
constexpr char llvm::AMDGPU::PALMD::AssemblerDirectiveBegin [] = ".amdgpu_pal_metadata"
 PAL metadata (new MsgPack format) beginning assembler directive.
 
constexpr char llvm::AMDGPU::PALMD::AssemblerDirectiveEnd [] = ".end_amdgpu_pal_metadata"
 PAL metadata (new MsgPack format) ending assembler directive.
 

Detailed Description

AMDGPU metadata definitions and in-memory representations.

Definition in file AMDGPUMetadata.h.