LLVM  14.0.0git
Namespaces | Classes | Enumerations | Functions | Variables
llvm::AMDGPU::HSAMD Namespace Reference

Namespaces

 Kernel
 
 Key
 
 V3
 

Classes

struct  Metadata
 In-memory representation of HSA metadata. More...
 
class  MetadataStreamer
 
class  MetadataStreamerV2
 
class  MetadataStreamerV3
 
class  MetadataStreamerV4
 

Enumerations

enum  AccessQualifier : uint8_t {
  AccessQualifier::Default = 0, AccessQualifier::ReadOnly = 1, AccessQualifier::WriteOnly = 2, AccessQualifier::ReadWrite = 3,
  AccessQualifier::Unknown = 0xff
}
 Access qualifiers. More...
 
enum  AddressSpaceQualifier : uint8_t {
  AddressSpaceQualifier::Private = 0, AddressSpaceQualifier::Global = 1, AddressSpaceQualifier::Constant = 2, AddressSpaceQualifier::Local = 3,
  AddressSpaceQualifier::Generic = 4, AddressSpaceQualifier::Region = 5, AddressSpaceQualifier::Unknown = 0xff
}
 Address space qualifiers. More...
 
enum  ValueKind : uint8_t {
  ValueKind::ByValue = 0, ValueKind::GlobalBuffer = 1, ValueKind::DynamicSharedPointer = 2, ValueKind::Sampler = 3,
  ValueKind::Image = 4, ValueKind::Pipe = 5, ValueKind::Queue = 6, ValueKind::HiddenGlobalOffsetX = 7,
  ValueKind::HiddenGlobalOffsetY = 8, ValueKind::HiddenGlobalOffsetZ = 9, ValueKind::HiddenNone = 10, ValueKind::HiddenPrintfBuffer = 11,
  ValueKind::HiddenDefaultQueue = 12, ValueKind::HiddenCompletionAction = 13, ValueKind::HiddenMultiGridSyncArg = 14, ValueKind::HiddenHostcallBuffer = 15,
  ValueKind::Unknown = 0xff
}
 Value kinds. More...
 
enum  ValueType : uint8_t {
  ValueType::Struct = 0, ValueType::I8 = 1, ValueType::U8 = 2, ValueType::I16 = 3,
  ValueType::U16 = 4, ValueType::F16 = 5, ValueType::I32 = 6, ValueType::U32 = 7,
  ValueType::F32 = 8, ValueType::I64 = 9, ValueType::U64 = 10, ValueType::F64 = 11,
  ValueType::Unknown = 0xff
}
 Value types. More...
 

Functions

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

Variables

constexpr uint32_t VersionMajorV2 = 1
 HSA metadata major version for code object V2. More...
 
constexpr uint32_t VersionMinorV2 = 0
 HSA metadata minor version for code object V2. More...
 
constexpr uint32_t VersionMajorV3 = 1
 HSA metadata major version for code object V3. More...
 
constexpr uint32_t VersionMinorV3 = 0
 HSA metadata minor version for code object V3. More...
 
constexpr uint32_t VersionMajorV4 = 1
 HSA metadata major version for code object V4. More...
 
constexpr uint32_t VersionMinorV4 = 1
 HSA metadata minor version for code object V4. More...
 
constexpr char AssemblerDirectiveBegin [] = ".amd_amdgpu_hsa_metadata"
 HSA metadata beginning assembler directive. More...
 
constexpr char AssemblerDirectiveEnd [] = ".end_amd_amdgpu_hsa_metadata"
 HSA metadata ending assembler directive. More...
 

Enumeration Type Documentation

◆ AccessQualifier

enum llvm::AMDGPU::HSAMD::AccessQualifier : uint8_t
strong

Access qualifiers.

Enumerator
Default 
ReadOnly 
WriteOnly 
ReadWrite 
Unknown 

Definition at line 53 of file AMDGPUMetadata.h.

◆ AddressSpaceQualifier

Address space qualifiers.

Enumerator
Private 
Global 
Constant 
Local 
Generic 
Region 
Unknown 

Definition at line 62 of file AMDGPUMetadata.h.

◆ ValueKind

enum llvm::AMDGPU::HSAMD::ValueKind : uint8_t
strong

Value kinds.

Enumerator
ByValue 
GlobalBuffer 
DynamicSharedPointer 
Sampler 
Image 
Pipe 
Queue 
HiddenGlobalOffsetX 
HiddenGlobalOffsetY 
HiddenGlobalOffsetZ 
HiddenNone 
HiddenPrintfBuffer 
HiddenDefaultQueue 
HiddenCompletionAction 
HiddenMultiGridSyncArg 
HiddenHostcallBuffer 
Unknown 

Definition at line 73 of file AMDGPUMetadata.h.

◆ ValueType

enum llvm::AMDGPU::HSAMD::ValueType : uint8_t
strong

Value types.

This is deprecated and only remains for compatibility parsing of old metadata.

Enumerator
Struct 
I8 
U8 
I16 
U16 
F16 
I32 
U32 
F32 
I64 
U64 
F64 
Unknown 

Definition at line 95 of file AMDGPUMetadata.h.

Function Documentation

◆ fromString()

std::error_code llvm::AMDGPU::HSAMD::fromString ( StringRef  String,
Metadata HSAMetadata 
)

Converts String to HSAMetadata.

Definition at line 213 of file AMDGPUMetadata.cpp.

Referenced by llvm::AMDGPUTargetStreamer::EmitHSAMetadataV2().

◆ toString()

std::error_code llvm::AMDGPU::HSAMD::toString ( Metadata  HSAMetadata,
std::string &  String 
)

Converts HSAMetadata to String.

Definition at line 219 of file AMDGPUMetadata.cpp.

References llvm::max().

Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerV2::end().

Variable Documentation

◆ AssemblerDirectiveBegin

constexpr char llvm::AMDGPU::HSAMD::AssemblerDirectiveBegin[] = ".amd_amdgpu_hsa_metadata"
constexpr

HSA metadata beginning assembler directive.

Definition at line 48 of file AMDGPUMetadata.h.

Referenced by llvm::AMDGPUTargetAsmStreamer::EmitHSAMetadata().

◆ AssemblerDirectiveEnd

constexpr char llvm::AMDGPU::HSAMD::AssemblerDirectiveEnd[] = ".end_amd_amdgpu_hsa_metadata"
constexpr

HSA metadata ending assembler directive.

Definition at line 50 of file AMDGPUMetadata.h.

Referenced by llvm::AMDGPUTargetAsmStreamer::EmitHSAMetadata().

◆ VersionMajorV2

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV2 = 1
constexpr

HSA metadata major version for code object V2.

Definition at line 33 of file AMDGPUMetadata.h.

◆ VersionMajorV3

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV3 = 1
constexpr

HSA metadata major version for code object V3.

Definition at line 38 of file AMDGPUMetadata.h.

Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerV3::emitVersion().

◆ VersionMajorV4

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMajorV4 = 1
constexpr

HSA metadata major version for code object V4.

Definition at line 43 of file AMDGPUMetadata.h.

◆ VersionMinorV2

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV2 = 0
constexpr

HSA metadata minor version for code object V2.

Definition at line 35 of file AMDGPUMetadata.h.

◆ VersionMinorV3

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV3 = 0
constexpr

HSA metadata minor version for code object V3.

Definition at line 40 of file AMDGPUMetadata.h.

Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerV3::emitVersion().

◆ VersionMinorV4

constexpr uint32_t llvm::AMDGPU::HSAMD::VersionMinorV4 = 1
constexpr

HSA metadata minor version for code object V4.

Definition at line 45 of file AMDGPUMetadata.h.