LLVM  16.0.0git
AMDGPUMetadata.h
Go to the documentation of this file.
1 //===--- AMDGPUMetadata.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// AMDGPU metadata definitions and in-memory representations.
11 ///
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_SUPPORT_AMDGPUMETADATA_H
16 #define LLVM_SUPPORT_AMDGPUMETADATA_H
17 
18 #include "llvm/ADT/StringRef.h"
19 #include <cstdint>
20 #include <string>
21 #include <system_error>
22 #include <vector>
23 
24 namespace llvm {
25 namespace AMDGPU {
26 
27 //===----------------------------------------------------------------------===//
28 // HSA metadata.
29 //===----------------------------------------------------------------------===//
30 namespace HSAMD {
31 
32 /// HSA metadata major version for code object V2.
33 constexpr uint32_t VersionMajorV2 = 1;
34 /// HSA metadata minor version for code object V2.
35 constexpr uint32_t VersionMinorV2 = 0;
36 
37 /// HSA metadata major version for code object V3.
38 constexpr uint32_t VersionMajorV3 = 1;
39 /// HSA metadata minor version for code object V3.
40 constexpr uint32_t VersionMinorV3 = 0;
41 
42 /// HSA metadata major version for code object V4.
43 constexpr uint32_t VersionMajorV4 = 1;
44 /// HSA metadata minor version for code object V4.
45 constexpr uint32_t VersionMinorV4 = 1;
46 
47 /// HSA metadata major version for code object V5.
48 constexpr uint32_t VersionMajorV5 = 1;
49 /// HSA metadata minor version for code object V5.
50 constexpr uint32_t VersionMinorV5 = 2;
51 
52 /// HSA metadata beginning assembler directive.
53 constexpr char AssemblerDirectiveBegin[] = ".amd_amdgpu_hsa_metadata";
54 /// HSA metadata ending assembler directive.
55 constexpr char AssemblerDirectiveEnd[] = ".end_amd_amdgpu_hsa_metadata";
56 
57 /// Access qualifiers.
58 enum class AccessQualifier : uint8_t {
59  Default = 0,
60  ReadOnly = 1,
61  WriteOnly = 2,
62  ReadWrite = 3,
63  Unknown = 0xff
64 };
65 
66 /// Address space qualifiers.
67 enum class AddressSpaceQualifier : uint8_t {
68  Private = 0,
69  Global = 1,
70  Constant = 2,
71  Local = 3,
72  Generic = 4,
73  Region = 5,
74  Unknown = 0xff
75 };
76 
77 /// Value kinds.
78 enum class ValueKind : uint8_t {
79  ByValue = 0,
80  GlobalBuffer = 1,
82  Sampler = 3,
83  Image = 4,
84  Pipe = 5,
85  Queue = 6,
89  HiddenNone = 10,
90  HiddenPrintfBuffer = 11,
91  HiddenDefaultQueue = 12,
95  Unknown = 0xff
96 };
97 
98 /// Value types. This is deprecated and only remains for compatibility parsing
99 /// of old metadata.
100 enum class ValueType : uint8_t {
101  Struct = 0,
102  I8 = 1,
103  U8 = 2,
104  I16 = 3,
105  U16 = 4,
106  F16 = 5,
107  I32 = 6,
108  U32 = 7,
109  F32 = 8,
110  I64 = 9,
111  U64 = 10,
112  F64 = 11,
113  Unknown = 0xff
114 };
115 
116 //===----------------------------------------------------------------------===//
117 // Kernel Metadata.
118 //===----------------------------------------------------------------------===//
119 namespace Kernel {
120 
121 //===----------------------------------------------------------------------===//
122 // Kernel Attributes Metadata.
123 //===----------------------------------------------------------------------===//
124 namespace Attrs {
125 
126 namespace Key {
127 /// Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
128 constexpr char ReqdWorkGroupSize[] = "ReqdWorkGroupSize";
129 /// Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
130 constexpr char WorkGroupSizeHint[] = "WorkGroupSizeHint";
131 /// Key for Kernel::Attr::Metadata::mVecTypeHint.
132 constexpr char VecTypeHint[] = "VecTypeHint";
133 /// Key for Kernel::Attr::Metadata::mRuntimeHandle.
134 constexpr char RuntimeHandle[] = "RuntimeHandle";
135 } // end namespace Key
136 
137 /// In-memory representation of kernel attributes metadata.
138 struct Metadata final {
139  /// 'reqd_work_group_size' attribute. Optional.
140  std::vector<uint32_t> mReqdWorkGroupSize = std::vector<uint32_t>();
141  /// 'work_group_size_hint' attribute. Optional.
142  std::vector<uint32_t> mWorkGroupSizeHint = std::vector<uint32_t>();
143  /// 'vec_type_hint' attribute. Optional.
144  std::string mVecTypeHint = std::string();
145  /// External symbol created by runtime to store the kernel address
146  /// for enqueued blocks.
147  std::string mRuntimeHandle = std::string();
148 
149  /// Default constructor.
150  Metadata() = default;
151 
152  /// \returns True if kernel attributes metadata is empty, false otherwise.
153  bool empty() const {
154  return !notEmpty();
155  }
156 
157  /// \returns True if kernel attributes metadata is not empty, false otherwise.
158  bool notEmpty() const {
159  return !mReqdWorkGroupSize.empty() || !mWorkGroupSizeHint.empty() ||
160  !mVecTypeHint.empty() || !mRuntimeHandle.empty();
161  }
162 };
163 
164 } // end namespace Attrs
165 
166 //===----------------------------------------------------------------------===//
167 // Kernel Argument Metadata.
168 //===----------------------------------------------------------------------===//
169 namespace Arg {
170 
171 namespace Key {
172 /// Key for Kernel::Arg::Metadata::mName.
173 constexpr char Name[] = "Name";
174 /// Key for Kernel::Arg::Metadata::mTypeName.
175 constexpr char TypeName[] = "TypeName";
176 /// Key for Kernel::Arg::Metadata::mSize.
177 constexpr char Size[] = "Size";
178 /// Key for Kernel::Arg::Metadata::mOffset.
179 constexpr char Offset[] = "Offset";
180 /// Key for Kernel::Arg::Metadata::mAlign.
181 constexpr char Align[] = "Align";
182 /// Key for Kernel::Arg::Metadata::mValueKind.
183 constexpr char ValueKind[] = "ValueKind";
184 /// Key for Kernel::Arg::Metadata::mValueType. (deprecated)
185 constexpr char ValueType[] = "ValueType";
186 /// Key for Kernel::Arg::Metadata::mPointeeAlign.
187 constexpr char PointeeAlign[] = "PointeeAlign";
188 /// Key for Kernel::Arg::Metadata::mAddrSpaceQual.
189 constexpr char AddrSpaceQual[] = "AddrSpaceQual";
190 /// Key for Kernel::Arg::Metadata::mAccQual.
191 constexpr char AccQual[] = "AccQual";
192 /// Key for Kernel::Arg::Metadata::mActualAccQual.
193 constexpr char ActualAccQual[] = "ActualAccQual";
194 /// Key for Kernel::Arg::Metadata::mIsConst.
195 constexpr char IsConst[] = "IsConst";
196 /// Key for Kernel::Arg::Metadata::mIsRestrict.
197 constexpr char IsRestrict[] = "IsRestrict";
198 /// Key for Kernel::Arg::Metadata::mIsVolatile.
199 constexpr char IsVolatile[] = "IsVolatile";
200 /// Key for Kernel::Arg::Metadata::mIsPipe.
201 constexpr char IsPipe[] = "IsPipe";
202 } // end namespace Key
203 
204 /// In-memory representation of kernel argument metadata.
205 struct Metadata final {
206  /// Name. Optional.
207  std::string mName = std::string();
208  /// Type name. Optional.
209  std::string mTypeName = std::string();
210  /// Size in bytes. Required.
212  /// Offset in bytes. Required for code object v3, unused for code object v2.
214  /// Alignment in bytes. Required.
216  /// Value kind. Required.
218  /// Pointee alignment in bytes. Optional.
220  /// Address space qualifier. Optional.
222  /// Access qualifier. Optional.
224  /// Actual access qualifier. Optional.
226  /// True if 'const' qualifier is specified. Optional.
227  bool mIsConst = false;
228  /// True if 'restrict' qualifier is specified. Optional.
229  bool mIsRestrict = false;
230  /// True if 'volatile' qualifier is specified. Optional.
231  bool mIsVolatile = false;
232  /// True if 'pipe' qualifier is specified. Optional.
233  bool mIsPipe = false;
234 
235  /// Default constructor.
236  Metadata() = default;
237 };
238 
239 } // end namespace Arg
240 
241 //===----------------------------------------------------------------------===//
242 // Kernel Code Properties Metadata.
243 //===----------------------------------------------------------------------===//
244 namespace CodeProps {
245 
246 namespace Key {
247 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
248 constexpr char KernargSegmentSize[] = "KernargSegmentSize";
249 /// Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
250 constexpr char GroupSegmentFixedSize[] = "GroupSegmentFixedSize";
251 /// Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
252 constexpr char PrivateSegmentFixedSize[] = "PrivateSegmentFixedSize";
253 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
254 constexpr char KernargSegmentAlign[] = "KernargSegmentAlign";
255 /// Key for Kernel::CodeProps::Metadata::mWavefrontSize.
256 constexpr char WavefrontSize[] = "WavefrontSize";
257 /// Key for Kernel::CodeProps::Metadata::mNumSGPRs.
258 constexpr char NumSGPRs[] = "NumSGPRs";
259 /// Key for Kernel::CodeProps::Metadata::mNumVGPRs.
260 constexpr char NumVGPRs[] = "NumVGPRs";
261 /// Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
262 constexpr char MaxFlatWorkGroupSize[] = "MaxFlatWorkGroupSize";
263 /// Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
264 constexpr char IsDynamicCallStack[] = "IsDynamicCallStack";
265 /// Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
266 constexpr char IsXNACKEnabled[] = "IsXNACKEnabled";
267 /// Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
268 constexpr char NumSpilledSGPRs[] = "NumSpilledSGPRs";
269 /// Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
270 constexpr char NumSpilledVGPRs[] = "NumSpilledVGPRs";
271 } // end namespace Key
272 
273 /// In-memory representation of kernel code properties metadata.
274 struct Metadata final {
275  /// Size in bytes of the kernarg segment memory. Kernarg segment memory
276  /// holds the values of the arguments to the kernel. Required.
278  /// Size in bytes of the group segment memory required by a workgroup.
279  /// This value does not include any dynamically allocated group segment memory
280  /// that may be added when the kernel is dispatched. Required.
282  /// Size in bytes of the private segment memory required by a workitem.
283  /// Private segment memory includes arg, spill and private segments. Required.
285  /// Maximum byte alignment of variables used by the kernel in the
286  /// kernarg memory segment. Required.
288  /// Wavefront size. Required.
290  /// Total number of SGPRs used by a wavefront. Optional.
292  /// Total number of VGPRs used by a workitem. Optional.
294  /// Maximum flat work-group size supported by the kernel. Optional.
296  /// True if the generated machine code is using a dynamically sized
297  /// call stack. Optional.
298  bool mIsDynamicCallStack = false;
299  /// True if the generated machine code is capable of supporting XNACK.
300  /// Optional.
301  bool mIsXNACKEnabled = false;
302  /// Number of SGPRs spilled by a wavefront. Optional.
304  /// Number of VGPRs spilled by a workitem. Optional.
306 
307  /// Default constructor.
308  Metadata() = default;
309 
310  /// \returns True if kernel code properties metadata is empty, false
311  /// otherwise.
312  bool empty() const {
313  return !notEmpty();
314  }
315 
316  /// \returns True if kernel code properties metadata is not empty, false
317  /// otherwise.
318  bool notEmpty() const {
319  return true;
320  }
321 };
322 
323 } // end namespace CodeProps
324 
325 //===----------------------------------------------------------------------===//
326 // Kernel Debug Properties Metadata.
327 //===----------------------------------------------------------------------===//
328 namespace DebugProps {
329 
330 namespace Key {
331 /// Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
332 constexpr char DebuggerABIVersion[] = "DebuggerABIVersion";
333 /// Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
334 constexpr char ReservedNumVGPRs[] = "ReservedNumVGPRs";
335 /// Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
336 constexpr char ReservedFirstVGPR[] = "ReservedFirstVGPR";
337 /// Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
338 constexpr char PrivateSegmentBufferSGPR[] = "PrivateSegmentBufferSGPR";
339 /// Key for
340 /// Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
342  "WavefrontPrivateSegmentOffsetSGPR";
343 } // end namespace Key
344 
345 /// In-memory representation of kernel debug properties metadata.
346 struct Metadata final {
347  /// Debugger ABI version. Optional.
348  std::vector<uint32_t> mDebuggerABIVersion = std::vector<uint32_t>();
349  /// Consecutive number of VGPRs reserved for debugger use. Must be 0 if
350  /// mDebuggerABIVersion is not set. Optional.
352  /// First fixed VGPR reserved. Must be uint16_t(-1) if
353  /// mDebuggerABIVersion is not set or mReservedFirstVGPR is 0. Optional.
355  /// Fixed SGPR of the first of 4 SGPRs used to hold the scratch V# used
356  /// for the entire kernel execution. Must be uint16_t(-1) if
357  /// mDebuggerABIVersion is not set or SGPR not used or not known. Optional.
359  /// Fixed SGPR used to hold the wave scratch offset for the entire
360  /// kernel execution. Must be uint16_t(-1) if mDebuggerABIVersion is not set
361  /// or SGPR is not used or not known. Optional.
363 
364  /// Default constructor.
365  Metadata() = default;
366 
367  /// \returns True if kernel debug properties metadata is empty, false
368  /// otherwise.
369  bool empty() const {
370  return !notEmpty();
371  }
372 
373  /// \returns True if kernel debug properties metadata is not empty, false
374  /// otherwise.
375  bool notEmpty() const {
376  return !mDebuggerABIVersion.empty();
377  }
378 };
379 
380 } // end namespace DebugProps
381 
382 namespace Key {
383 /// Key for Kernel::Metadata::mName.
384 constexpr char Name[] = "Name";
385 /// Key for Kernel::Metadata::mSymbolName.
386 constexpr char SymbolName[] = "SymbolName";
387 /// Key for Kernel::Metadata::mLanguage.
388 constexpr char Language[] = "Language";
389 /// Key for Kernel::Metadata::mLanguageVersion.
390 constexpr char LanguageVersion[] = "LanguageVersion";
391 /// Key for Kernel::Metadata::mAttrs.
392 constexpr char Attrs[] = "Attrs";
393 /// Key for Kernel::Metadata::mArgs.
394 constexpr char Args[] = "Args";
395 /// Key for Kernel::Metadata::mCodeProps.
396 constexpr char CodeProps[] = "CodeProps";
397 /// Key for Kernel::Metadata::mDebugProps.
398 constexpr char DebugProps[] = "DebugProps";
399 } // end namespace Key
400 
401 /// In-memory representation of kernel metadata.
402 struct Metadata final {
403  /// Kernel source name. Required.
404  std::string mName = std::string();
405  /// Kernel descriptor name. Required.
406  std::string mSymbolName = std::string();
407  /// Language. Optional.
408  std::string mLanguage = std::string();
409  /// Language version. Optional.
410  std::vector<uint32_t> mLanguageVersion = std::vector<uint32_t>();
411  /// Attributes metadata. Optional.
413  /// Arguments metadata. Optional.
414  std::vector<Arg::Metadata> mArgs = std::vector<Arg::Metadata>();
415  /// Code properties metadata. Optional.
417  /// Debug properties metadata. Optional.
419 
420  /// Default constructor.
421  Metadata() = default;
422 };
423 
424 } // end namespace Kernel
425 
426 namespace Key {
427 /// Key for HSA::Metadata::mVersion.
428 constexpr char Version[] = "Version";
429 /// Key for HSA::Metadata::mPrintf.
430 constexpr char Printf[] = "Printf";
431 /// Key for HSA::Metadata::mKernels.
432 constexpr char Kernels[] = "Kernels";
433 } // end namespace Key
434 
435 /// In-memory representation of HSA metadata.
436 struct Metadata final {
437  /// HSA metadata version. Required.
438  std::vector<uint32_t> mVersion = std::vector<uint32_t>();
439  /// Printf metadata. Optional.
440  std::vector<std::string> mPrintf = std::vector<std::string>();
441  /// Kernels metadata. Required.
442  std::vector<Kernel::Metadata> mKernels = std::vector<Kernel::Metadata>();
443 
444  /// Default constructor.
445  Metadata() = default;
446 };
447 
448 /// Converts \p String to \p HSAMetadata.
449 std::error_code fromString(StringRef String, Metadata &HSAMetadata);
450 
451 /// Converts \p HSAMetadata to \p String.
452 std::error_code toString(Metadata HSAMetadata, std::string &String);
453 
454 //===----------------------------------------------------------------------===//
455 // HSA metadata for v3 code object.
456 //===----------------------------------------------------------------------===//
457 namespace V3 {
458 /// HSA metadata major version.
459 constexpr uint32_t VersionMajor = 1;
460 /// HSA metadata minor version.
461 constexpr uint32_t VersionMinor = 0;
462 
463 /// HSA metadata beginning assembler directive.
464 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_metadata";
465 /// HSA metadata ending assembler directive.
466 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_metadata";
467 } // end namespace V3
468 
469 } // end namespace HSAMD
470 
471 //===----------------------------------------------------------------------===//
472 // PAL metadata.
473 //===----------------------------------------------------------------------===//
474 namespace PALMD {
475 
476 /// PAL metadata (old linear format) assembler directive.
477 constexpr char AssemblerDirective[] = ".amd_amdgpu_pal_metadata";
478 
479 /// PAL metadata (new MsgPack format) beginning assembler directive.
480 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_pal_metadata";
481 
482 /// PAL metadata (new MsgPack format) ending assembler directive.
483 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_pal_metadata";
484 
485 /// PAL metadata keys.
486 enum Key : uint32_t {
499 
500  LS_NUM_USED_VGPRS = 0x10000021,
501  HS_NUM_USED_VGPRS = 0x10000022,
502  ES_NUM_USED_VGPRS = 0x10000023,
503  GS_NUM_USED_VGPRS = 0x10000024,
504  VS_NUM_USED_VGPRS = 0x10000025,
505  PS_NUM_USED_VGPRS = 0x10000026,
506  CS_NUM_USED_VGPRS = 0x10000027,
507 
508  LS_NUM_USED_SGPRS = 0x10000028,
509  HS_NUM_USED_SGPRS = 0x10000029,
510  ES_NUM_USED_SGPRS = 0x1000002a,
511  GS_NUM_USED_SGPRS = 0x1000002b,
512  VS_NUM_USED_SGPRS = 0x1000002c,
513  PS_NUM_USED_SGPRS = 0x1000002d,
514  CS_NUM_USED_SGPRS = 0x1000002e,
515 
516  LS_SCRATCH_SIZE = 0x10000044,
517  HS_SCRATCH_SIZE = 0x10000045,
518  ES_SCRATCH_SIZE = 0x10000046,
519  GS_SCRATCH_SIZE = 0x10000047,
520  VS_SCRATCH_SIZE = 0x10000048,
521  PS_SCRATCH_SIZE = 0x10000049,
522  CS_SCRATCH_SIZE = 0x1000004a
523 };
524 
525 } // end namespace PALMD
526 } // end namespace AMDGPU
527 } // end namespace llvm
528 
529 #endif // LLVM_SUPPORT_AMDGPUMETADATA_H
llvm::AMDGPU::PALMD::GS_NUM_USED_VGPRS
@ GS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:503
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mAccQual
AccessQualifier mAccQual
Access qualifier. Optional.
Definition: AMDGPUMetadata.h:223
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR
uint16_t mPrivateSegmentBufferSGPR
Fixed SGPR of the first of 4 SGPRs used to hold the scratch V# used for the entire kernel execution.
Definition: AMDGPUMetadata.h:358
llvm::AMDGPU::HSAMD::Metadata::Metadata
Metadata()=default
Default constructor.
Attrs
Function Attrs
Definition: README_ALTIVEC.txt:215
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::notEmpty
bool notEmpty() const
Definition: AMDGPUMetadata.h:375
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata
In-memory representation of kernel debug properties metadata.
Definition: AMDGPUMetadata.h:346
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::AMDGPU::PALMD::R_A2D5_VGT_SHADER_STAGES_EN
@ R_A2D5_VGT_SHADER_STAGES_EN
Definition: AMDGPUMetadata.h:498
llvm::AMDGPU::HSAMD::ValueType::U16
@ U16
llvm::AMDGPU::PALMD::GS_NUM_USED_SGPRS
@ GS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:511
llvm::AMDGPU::HSAMD::AccessQualifier::Unknown
@ Unknown
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::empty
bool empty() const
Definition: AMDGPUMetadata.h:312
llvm::AMDGPU::HSAMD::Kernel::Metadata::mArgs
std::vector< Arg::Metadata > mArgs
Arguments metadata. Optional.
Definition: AMDGPUMetadata.h:414
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSGPRs
constexpr char NumSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSGPRs.
Definition: AMDGPUMetadata.h:258
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::mReservedFirstVGPR
uint16_t mReservedFirstVGPR
First fixed VGPR reserved.
Definition: AMDGPUMetadata.h:354
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::KernargSegmentSize
constexpr char KernargSegmentSize[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
Definition: AMDGPUMetadata.h:248
llvm::AMDGPU::HSAMD::Metadata::mVersion
std::vector< uint32_t > mVersion
HSA metadata version. Required.
Definition: AMDGPUMetadata.h:438
llvm::AMDGPU::HSAMD::Kernel::Key::Attrs
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
Definition: AMDGPUMetadata.h:392
StringRef.h
llvm::AMDGPU::HSAMD::ValueKind::ByValue
@ ByValue
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mIsConst
bool mIsConst
True if 'const' qualifier is specified. Optional.
Definition: AMDGPUMetadata.h:227
llvm::AMDGPU::PALMD::R_2D4A_SPI_SHADER_PGM_RSRC1_LS
@ R_2D4A_SPI_SHADER_PGM_RSRC1_LS
Definition: AMDGPUMetadata.h:488
llvm::AMDGPU::PALMD::R_A1B4_SPI_PS_INPUT_ADDR
@ R_A1B4_SPI_PS_INPUT_ADDR
Definition: AMDGPUMetadata.h:496
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mValueKind
ValueKind mValueKind
Value kind. Required.
Definition: AMDGPUMetadata.h:217
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::AddrSpaceQual
constexpr char AddrSpaceQual[]
Key for Kernel::Arg::Metadata::mAddrSpaceQual.
Definition: AMDGPUMetadata.h:189
llvm::AMDGPU::PALMD::R_2E12_COMPUTE_PGM_RSRC1
@ R_2E12_COMPUTE_PGM_RSRC1
Definition: AMDGPUMetadata.h:487
llvm::AMDGPU::HSAMD::ValueType::I8
@ I8
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Offset
constexpr char Offset[]
Key for Kernel::Arg::Metadata::mOffset.
Definition: AMDGPUMetadata.h:179
llvm::AMDGPU::HSAMD::ValueType::U32
@ U32
llvm::AMDGPU::HSAMD::VersionMajorV4
constexpr uint32_t VersionMajorV4
HSA metadata major version for code object V4.
Definition: AMDGPUMetadata.h:43
llvm::AMDGPU::HSAMD::Key::Version
constexpr char Version[]
Key for HSA::Metadata::mVersion.
Definition: AMDGPUMetadata.h:428
llvm::AMDGPU::PALMD::VS_SCRATCH_SIZE
@ VS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:520
llvm::AMDGPU::PALMD::ES_NUM_USED_SGPRS
@ ES_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:510
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize
uint32_t mPrivateSegmentFixedSize
Size in bytes of the private segment memory required by a workitem.
Definition: AMDGPUMetadata.h:284
llvm::AMDGPU::PALMD::VS_NUM_USED_VGPRS
@ VS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:504
llvm::AMDGPU::HSAMD::Kernel::Key::Name
constexpr char Name[]
Key for Kernel::Metadata::mName.
Definition: AMDGPUMetadata.h:384
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsPipe
constexpr char IsPipe[]
Key for Kernel::Arg::Metadata::mIsPipe.
Definition: AMDGPUMetadata.h:201
llvm::AMDGPU::PALMD::R_A1B3_SPI_PS_INPUT_ENA
@ R_A1B3_SPI_PS_INPUT_ENA
Definition: AMDGPUMetadata.h:495
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata
In-memory representation of kernel argument metadata.
Definition: AMDGPUMetadata.h:205
llvm::AMDGPU::PALMD::AssemblerDirective
constexpr char AssemblerDirective[]
PAL metadata (old linear format) assembler directive.
Definition: AMDGPUMetadata.h:477
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mActualAccQual
AccessQualifier mActualAccQual
Actual access qualifier. Optional.
Definition: AMDGPUMetadata.h:225
llvm::AMDGPU::PALMD::CS_NUM_USED_SGPRS
@ CS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:514
llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::ReqdWorkGroupSize
constexpr char ReqdWorkGroupSize[]
Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
Definition: AMDGPUMetadata.h:128
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mWavefrontSize
uint32_t mWavefrontSize
Wavefront size. Required.
Definition: AMDGPUMetadata.h:289
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::WavefrontPrivateSegmentOffsetSGPR
constexpr char WavefrontPrivateSegmentOffsetSGPR[]
Key for Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
Definition: AMDGPUMetadata.h:341
llvm::AMDGPU::PALMD::AssemblerDirectiveBegin
constexpr char AssemblerDirectiveBegin[]
PAL metadata (new MsgPack format) beginning assembler directive.
Definition: AMDGPUMetadata.h:480
llvm::AMDGPU::HSAMD::ValueKind::Queue
@ Queue
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::MaxFlatWorkGroupSize
constexpr char MaxFlatWorkGroupSize[]
Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
Definition: AMDGPUMetadata.h:262
llvm::AMDGPU::PALMD::ES_NUM_USED_VGPRS
@ ES_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:502
llvm::AMDGPU::HSAMD::V3::VersionMajor
constexpr uint32_t VersionMajor
HSA metadata major version.
Definition: AMDGPUMetadata.h:459
llvm::AMDGPU::HSAMD::VersionMajorV2
constexpr uint32_t VersionMajorV2
HSA metadata major version for code object V2.
Definition: AMDGPUMetadata.h:33
llvm::AMDGPU::HSAMD::AccessQualifier
AccessQualifier
Access qualifiers.
Definition: AMDGPUMetadata.h:58
llvm::AMDGPU::HSAMD::Kernel::Key::DebugProps
constexpr char DebugProps[]
Key for Kernel::Metadata::mDebugProps.
Definition: AMDGPUMetadata.h:398
Arg
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Definition: AMDGPULibCalls.cpp:186
llvm::AMDGPU::HSAMD::fromString
std::error_code fromString(StringRef String, Metadata &HSAMetadata)
Converts String to HSAMetadata.
Definition: AMDGPUMetadata.cpp:213
llvm::AMDGPU::HSAMD::Key::Kernels
constexpr char Kernels[]
Key for HSA::Metadata::mKernels.
Definition: AMDGPUMetadata.h:432
llvm::AMDGPU::HSAMD::ValueKind
ValueKind
Value kinds.
Definition: AMDGPUMetadata.h:78
llvm::AMDGPU::PALMD::VS_NUM_USED_SGPRS
@ VS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:512
llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::WorkGroupSizeHint
constexpr char WorkGroupSizeHint[]
Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
Definition: AMDGPUMetadata.h:130
llvm::AMDGPU::HSAMD::ValueType::F64
@ F64
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mIsXNACKEnabled
bool mIsXNACKEnabled
True if the generated machine code is capable of supporting XNACK.
Definition: AMDGPUMetadata.h:301
llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::VecTypeHint
constexpr char VecTypeHint[]
Key for Kernel::Attr::Metadata::mVecTypeHint.
Definition: AMDGPUMetadata.h:132
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mNumSGPRs
uint16_t mNumSGPRs
Total number of SGPRs used by a wavefront. Optional.
Definition: AMDGPUMetadata.h:291
llvm::AMDGPU::HSAMD::ValueType::I32
@ I32
llvm::AMDGPU::HSAMD::ValueKind::HiddenCompletionAction
@ HiddenCompletionAction
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSpilledVGPRs
constexpr char NumSpilledVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
Definition: AMDGPUMetadata.h:270
llvm::AMDGPU::HSAMD::ValueType::U64
@ U64
llvm::AMDGPU::HSAMD::Kernel::Key::Language
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
Definition: AMDGPUMetadata.h:388
llvm::AMDGPU::PALMD::R_2C8A_SPI_SHADER_PGM_RSRC1_GS
@ R_2C8A_SPI_SHADER_PGM_RSRC1_GS
Definition: AMDGPUMetadata.h:491
llvm::AMDGPU::HSAMD::VersionMinorV2
constexpr uint32_t VersionMinorV2
HSA metadata minor version for code object V2.
Definition: AMDGPUMetadata.h:35
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::PrivateSegmentFixedSize
constexpr char PrivateSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
Definition: AMDGPUMetadata.h:252
llvm::AMDGPU::HSAMD::Kernel::Metadata::mLanguage
std::string mLanguage
Language. Optional.
Definition: AMDGPUMetadata.h:408
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::AccQual
constexpr char AccQual[]
Key for Kernel::Arg::Metadata::mAccQual.
Definition: AMDGPUMetadata.h:191
llvm::AMDGPU::HSAMD::Kernel::Key::CodeProps
constexpr char CodeProps[]
Key for Kernel::Metadata::mCodeProps.
Definition: AMDGPUMetadata.h:396
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mTypeName
std::string mTypeName
Type name. Optional.
Definition: AMDGPUMetadata.h:209
llvm::AMDGPU::HSAMD::ValueKind::HiddenGlobalOffsetY
@ HiddenGlobalOffsetY
llvm::AMDGPU::PALMD::PS_NUM_USED_SGPRS
@ PS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:513
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::notEmpty
bool notEmpty() const
Definition: AMDGPUMetadata.h:158
llvm::AMDGPU::PALMD::Key
Key
PAL metadata keys.
Definition: AMDGPUMetadata.h:486
llvm::AMDGPU::PALMD::GS_SCRATCH_SIZE
@ GS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:519
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mIsPipe
bool mIsPipe
True if 'pipe' qualifier is specified. Optional.
Definition: AMDGPUMetadata.h:233
AMDGPU
Definition: AMDGPUReplaceLDSUseWithPointer.cpp:114
llvm::AMDGPU::HSAMD::ValueKind::HiddenGlobalOffsetZ
@ HiddenGlobalOffsetZ
llvm::AMDGPU::HSAMD::Metadata
In-memory representation of HSA metadata.
Definition: AMDGPUMetadata.h:436
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mSize
uint32_t mSize
Size in bytes. Required.
Definition: AMDGPUMetadata.h:211
llvm::AMDGPU::HSAMD::ValueKind::GlobalBuffer
@ GlobalBuffer
llvm::AMDGPU::HSAMD::ValueType::I64
@ I64
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Name
constexpr char Name[]
Key for Kernel::Arg::Metadata::mName.
Definition: AMDGPUMetadata.h:173
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mIsVolatile
bool mIsVolatile
True if 'volatile' qualifier is specified. Optional.
Definition: AMDGPUMetadata.h:231
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::Metadata
Metadata()=default
Default constructor.
llvm::AMDGPU::HSAMD::AddressSpaceQualifier::Global
@ Global
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mKernargSegmentAlign
uint32_t mKernargSegmentAlign
Maximum byte alignment of variables used by the kernel in the kernarg memory segment.
Definition: AMDGPUMetadata.h:287
llvm::AMDGPU::HSAMD::AccessQualifier::WriteOnly
@ WriteOnly
llvm::AMDGPU::HSAMD::ValueType::F16
@ F16
llvm::AMDGPU::HSAMD::VersionMajorV5
constexpr uint32_t VersionMajorV5
HSA metadata major version for code object V5.
Definition: AMDGPUMetadata.h:48
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::empty
bool empty() const
Definition: AMDGPUMetadata.h:153
llvm::AMDGPU::HSAMD::ValueKind::Image
@ Image
llvm::AMDGPU::PALMD::CS_NUM_USED_VGPRS
@ CS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:506
llvm::AMDGPU::HSAMD::VersionMinorV5
constexpr uint32_t VersionMinorV5
HSA metadata minor version for code object V5.
Definition: AMDGPUMetadata.h:50
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::mVecTypeHint
std::string mVecTypeHint
'vec_type_hint' attribute. Optional.
Definition: AMDGPUMetadata.h:144
llvm::AMDGPU::HSAMD::ValueKind::Unknown
@ Unknown
llvm::AMDGPU::HSAMD::V3::VersionMinor
constexpr uint32_t VersionMinor
HSA metadata minor version.
Definition: AMDGPUMetadata.h:461
llvm::AMDGPU::HSAMD::Metadata::mPrintf
std::vector< std::string > mPrintf
Printf metadata. Optional.
Definition: AMDGPUMetadata.h:440
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mNumSpilledSGPRs
uint16_t mNumSpilledSGPRs
Number of SGPRs spilled by a wavefront. Optional.
Definition: AMDGPUMetadata.h:303
uint64_t
llvm::AMDGPU::HSAMD::AddressSpaceQualifier::Local
@ Local
llvm::AMDGPU::HSAMD::Kernel::Metadata::mAttrs
Attrs::Metadata mAttrs
Attributes metadata. Optional.
Definition: AMDGPUMetadata.h:412
llvm::AMDGPU::HSAMD::AccessQualifier::ReadOnly
@ ReadOnly
llvm::AMDGPU::HSAMD::AccessQualifier::ReadWrite
@ ReadWrite
llvm::omp::Kernel
Function * Kernel
Summary of a kernel (=entry point for target offloading).
Definition: OpenMPOpt.h:21
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::ReservedFirstVGPR
constexpr char ReservedFirstVGPR[]
Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
Definition: AMDGPUMetadata.h:336
llvm::AMDGPU::HSAMD::ValueType::F32
@ F32
llvm::AMDGPU::HSAMD::Kernel::Metadata
In-memory representation of kernel metadata.
Definition: AMDGPUMetadata.h:402
llvm::AMDGPU::HSAMD::ValueKind::HiddenDefaultQueue
@ HiddenDefaultQueue
llvm::AMDGPU::PALMD::ES_SCRATCH_SIZE
@ ES_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:518
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::DebuggerABIVersion
constexpr char DebuggerABIVersion[]
Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
Definition: AMDGPUMetadata.h:332
llvm::AMDGPU::HSAMD::Kernel::Metadata::mLanguageVersion
std::vector< uint32_t > mLanguageVersion
Language version. Optional.
Definition: AMDGPUMetadata.h:410
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::mReservedNumVGPRs
uint16_t mReservedNumVGPRs
Consecutive number of VGPRs reserved for debugger use.
Definition: AMDGPUMetadata.h:351
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mAlign
uint32_t mAlign
Alignment in bytes. Required.
Definition: AMDGPUMetadata.h:215
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::GroupSegmentFixedSize
constexpr char GroupSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
Definition: AMDGPUMetadata.h:250
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::KernargSegmentAlign
constexpr char KernargSegmentAlign[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
Definition: AMDGPUMetadata.h:254
llvm::AMDGPU::HSAMD::ValueKind::HiddenNone
@ HiddenNone
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::Metadata
Metadata()=default
Default constructor.
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::PointeeAlign
constexpr char PointeeAlign[]
Key for Kernel::Arg::Metadata::mPointeeAlign.
Definition: AMDGPUMetadata.h:187
llvm::AMDGPU::HSAMD::AddressSpaceQualifier::Generic
@ Generic
llvm::AMDGPU::HSAMD::ValueKind::Pipe
@ Pipe
llvm::AMDGPU::HSAMD::Kernel::Metadata::Metadata
Metadata()=default
Default constructor.
llvm::AMDGPU::HSAMD::ValueType
ValueType
Value types.
Definition: AMDGPUMetadata.h:100
llvm::AMDGPU::HSAMD::ValueType::I16
@ I16
llvm::AMDGPU::PALMD::R_2E00_COMPUTE_DISPATCH_INITIATOR
@ R_2E00_COMPUTE_DISPATCH_INITIATOR
Definition: AMDGPUMetadata.h:494
llvm::AMDGPU::HSAMD::Kernel::Metadata::mCodeProps
CodeProps::Metadata mCodeProps
Code properties metadata. Optional.
Definition: AMDGPUMetadata.h:416
llvm::AMDGPU::HSAMD::AddressSpaceQualifier::Unknown
@ Unknown
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata
In-memory representation of kernel code properties metadata.
Definition: AMDGPUMetadata.h:274
llvm::AMDGPU::HSAMD::ValueKind::HiddenPrintfBuffer
@ HiddenPrintfBuffer
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::ReservedNumVGPRs
constexpr char ReservedNumVGPRs[]
Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
Definition: AMDGPUMetadata.h:334
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mPointeeAlign
uint32_t mPointeeAlign
Pointee alignment in bytes. Optional.
Definition: AMDGPUMetadata.h:219
llvm::AMDGPU::HSAMD::VersionMajorV3
constexpr uint32_t VersionMajorV3
HSA metadata major version for code object V3.
Definition: AMDGPUMetadata.h:38
llvm::AMDGPU::PALMD::R_2C4A_SPI_SHADER_PGM_RSRC1_VS
@ R_2C4A_SPI_SHADER_PGM_RSRC1_VS
Definition: AMDGPUMetadata.h:492
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR
uint16_t mWavefrontPrivateSegmentOffsetSGPR
Fixed SGPR used to hold the wave scratch offset for the entire kernel execution.
Definition: AMDGPUMetadata.h:362
llvm::AMDGPU::PALMD::HS_NUM_USED_VGPRS
@ HS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:501
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsConst
constexpr char IsConst[]
Key for Kernel::Arg::Metadata::mIsConst.
Definition: AMDGPUMetadata.h:195
llvm::AMDGPU::HSAMD::Kernel::Metadata::mName
std::string mName
Kernel source name. Required.
Definition: AMDGPUMetadata.h:404
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::AMDGPU::PALMD::HS_SCRATCH_SIZE
@ HS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:517
llvm::AMDGPU::HSAMD::Kernel::Metadata::mDebugProps
DebugProps::Metadata mDebugProps
Debug properties metadata. Optional.
Definition: AMDGPUMetadata.h:418
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::Metadata
Metadata()=default
Default constructor.
llvm::AMDGPU::HSAMD::ValueKind::Sampler
@ Sampler
uint32_t
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::Metadata
Metadata()=default
Default constructor.
llvm::AMDGPU::HSAMD::Kernel::Key::LanguageVersion
constexpr char LanguageVersion[]
Key for Kernel::Metadata::mLanguageVersion.
Definition: AMDGPUMetadata.h:390
llvm::AMDGPU::HSAMD::ValueType::U8
@ U8
llvm::AMDGPU::HSAMD::Metadata::mKernels
std::vector< Kernel::Metadata > mKernels
Kernels metadata. Required.
Definition: AMDGPUMetadata.h:442
llvm::AMDGPU::HSAMD::AssemblerDirectiveBegin
constexpr char AssemblerDirectiveBegin[]
HSA metadata beginning assembler directive.
Definition: AMDGPUMetadata.h:53
llvm::AMDGPU::HSAMD::Kernel::Metadata::mSymbolName
std::string mSymbolName
Kernel descriptor name. Required.
Definition: AMDGPUMetadata.h:406
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mNumSpilledVGPRs
uint16_t mNumSpilledVGPRs
Number of VGPRs spilled by a workitem. Optional.
Definition: AMDGPUMetadata.h:305
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata
In-memory representation of kernel attributes metadata.
Definition: AMDGPUMetadata.h:138
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsRestrict
constexpr char IsRestrict[]
Key for Kernel::Arg::Metadata::mIsRestrict.
Definition: AMDGPUMetadata.h:197
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile
constexpr char IsVolatile[]
Key for Kernel::Arg::Metadata::mIsVolatile.
Definition: AMDGPUMetadata.h:199
llvm::AMDGPU::HSAMD::ValueKind::HiddenMultiGridSyncArg
@ HiddenMultiGridSyncArg
llvm::AMDGPU::HSAMD::AddressSpaceQualifier
AddressSpaceQualifier
Address space qualifiers.
Definition: AMDGPUMetadata.h:67
llvm::AMDGPU::PALMD::LS_NUM_USED_VGPRS
@ LS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:500
llvm::AMDGPU::PALMD::PS_SCRATCH_SIZE
@ PS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:521
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize
uint32_t mMaxFlatWorkGroupSize
Maximum flat work-group size supported by the kernel. Optional.
Definition: AMDGPUMetadata.h:295
llvm::AMDGPU::HSAMD::ValueKind::DynamicSharedPointer
@ DynamicSharedPointer
llvm::AMDGPU::HSAMD::ValueKind::HiddenHostcallBuffer
@ HiddenHostcallBuffer
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mIsDynamicCallStack
bool mIsDynamicCallStack
True if the generated machine code is using a dynamically sized call stack.
Definition: AMDGPUMetadata.h:298
llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
Definition: AMDGPUMetadata.h:386
llvm::AMDGPU::PALMD::PS_NUM_USED_VGPRS
@ PS_NUM_USED_VGPRS
Definition: AMDGPUMetadata.h:505
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::mDebuggerABIVersion
std::vector< uint32_t > mDebuggerABIVersion
Debugger ABI version. Optional.
Definition: AMDGPUMetadata.h:348
llvm::AMDGPU::HSAMD::AssemblerDirectiveEnd
constexpr char AssemblerDirectiveEnd[]
HSA metadata ending assembler directive.
Definition: AMDGPUMetadata.h:55
llvm::AMDGPU::PALMD::R_2C0A_SPI_SHADER_PGM_RSRC1_PS
@ R_2C0A_SPI_SHADER_PGM_RSRC1_PS
Definition: AMDGPUMetadata.h:493
uint16_t
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::TypeName
constexpr char TypeName[]
Key for Kernel::Arg::Metadata::mTypeName.
Definition: AMDGPUMetadata.h:175
llvm::AMDGPU::PALMD::LS_SCRATCH_SIZE
@ LS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:516
llvm::AMDGPU::PALMD::HS_NUM_USED_SGPRS
@ HS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:509
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mOffset
uint32_t mOffset
Offset in bytes. Required for code object v3, unused for code object v2.
Definition: AMDGPUMetadata.h:213
llvm::AMDGPU::PALMD::R_A1B6_SPI_PS_IN_CONTROL
@ R_A1B6_SPI_PS_IN_CONTROL
Definition: AMDGPUMetadata.h:497
llvm::AMDGPU::PALMD::R_2CCA_SPI_SHADER_PGM_RSRC1_ES
@ R_2CCA_SPI_SHADER_PGM_RSRC1_ES
Definition: AMDGPUMetadata.h:490
llvm::AMDGPU::PALMD::LS_NUM_USED_SGPRS
@ LS_NUM_USED_SGPRS
Definition: AMDGPUMetadata.h:508
llvm::AMDGPU::PALMD::CS_SCRATCH_SIZE
@ CS_SCRATCH_SIZE
Definition: AMDGPUMetadata.h:522
llvm::AMDGPU::PALMD::AssemblerDirectiveEnd
constexpr char AssemblerDirectiveEnd[]
PAL metadata (new MsgPack format) ending assembler directive.
Definition: AMDGPUMetadata.h:483
llvm::AMDGPU::HSAMD::ValueType::Struct
@ Struct
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mKernargSegmentSize
uint64_t mKernargSegmentSize
Size in bytes of the kernarg segment memory.
Definition: AMDGPUMetadata.h:277
llvm::AMDGPU::HSAMD::Kernel::Attrs::Key::RuntimeHandle
constexpr char RuntimeHandle[]
Key for Kernel::Attr::Metadata::mRuntimeHandle.
Definition: AMDGPUMetadata.h:134
llvm::AMDGPU::HSAMD::AccessQualifier::Default
@ Default
llvm::AMDGPU::HSAMD::Key::Printf
constexpr char Printf[]
Key for HSA::Metadata::mPrintf.
Definition: AMDGPUMetadata.h:430
llvm::AMDGPU::HSAMD::V3::AssemblerDirectiveBegin
constexpr char AssemblerDirectiveBegin[]
HSA metadata beginning assembler directive.
Definition: AMDGPUMetadata.h:464
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::mReqdWorkGroupSize
std::vector< uint32_t > mReqdWorkGroupSize
'reqd_work_group_size' attribute. Optional.
Definition: AMDGPUMetadata.h:140
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Metadata::empty
bool empty() const
Definition: AMDGPUMetadata.h:369
llvm::AMDGPU::HSAMD::AddressSpaceQualifier::Private
@ Private
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mIsRestrict
bool mIsRestrict
True if 'restrict' qualifier is specified. Optional.
Definition: AMDGPUMetadata.h:229
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mName
std::string mName
Name. Optional.
Definition: AMDGPUMetadata.h:207
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::notEmpty
bool notEmpty() const
Definition: AMDGPUMetadata.h:318
llvm::AMDGPU::HSAMD::V3::AssemblerDirectiveEnd
constexpr char AssemblerDirectiveEnd[]
HSA metadata ending assembler directive.
Definition: AMDGPUMetadata.h:466
llvm::AMDGPU::HSAMD::Kernel::DebugProps::Key::PrivateSegmentBufferSGPR
constexpr char PrivateSegmentBufferSGPR[]
Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
Definition: AMDGPUMetadata.h:338
llvm::AMDGPU::PALMD::R_2D0A_SPI_SHADER_PGM_RSRC1_HS
@ R_2D0A_SPI_SHADER_PGM_RSRC1_HS
Definition: AMDGPUMetadata.h:489
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::WavefrontSize
constexpr char WavefrontSize[]
Key for Kernel::CodeProps::Metadata::mWavefrontSize.
Definition: AMDGPUMetadata.h:256
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumVGPRs
constexpr char NumVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumVGPRs.
Definition: AMDGPUMetadata.h:260
llvm::AMDGPU::HSAMD::ValueType::Unknown
@ Unknown
llvm::AMDGPU::HSAMD::Kernel::Arg::Metadata::mAddrSpaceQual
AddressSpaceQualifier mAddrSpaceQual
Address space qualifier. Optional.
Definition: AMDGPUMetadata.h:221
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::NumSpilledSGPRs
constexpr char NumSpilledSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
Definition: AMDGPUMetadata.h:268
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:394
llvm::Region
Definition: RegionInfo.h:889
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::mRuntimeHandle
std::string mRuntimeHandle
External symbol created by runtime to store the kernel address for enqueued blocks.
Definition: AMDGPUMetadata.h:147
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::IsDynamicCallStack
constexpr char IsDynamicCallStack[]
Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
Definition: AMDGPUMetadata.h:264
llvm::AMDGPU::HSAMD::VersionMinorV3
constexpr uint32_t VersionMinorV3
HSA metadata minor version for code object V3.
Definition: AMDGPUMetadata.h:40
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mGroupSegmentFixedSize
uint32_t mGroupSegmentFixedSize
Size in bytes of the group segment memory required by a workgroup.
Definition: AMDGPUMetadata.h:281
llvm::AMDGPU::HSAMD::Kernel::Attrs::Metadata::mWorkGroupSizeHint
std::vector< uint32_t > mWorkGroupSizeHint
'work_group_size_hint' attribute. Optional.
Definition: AMDGPUMetadata.h:142
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::IsXNACKEnabled
constexpr char IsXNACKEnabled[]
Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
Definition: AMDGPUMetadata.h:266
llvm::AMDGPU::HSAMD::Kernel::CodeProps::Metadata::mNumVGPRs
uint16_t mNumVGPRs
Total number of VGPRs used by a workitem. Optional.
Definition: AMDGPUMetadata.h:293
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::ActualAccQual
constexpr char ActualAccQual[]
Key for Kernel::Arg::Metadata::mActualAccQual.
Definition: AMDGPUMetadata.h:193
llvm::AMDGPU::HSAMD::ValueKind::HiddenGlobalOffsetX
@ HiddenGlobalOffsetX
llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
Definition: AMDGPUMetadata.h:177
llvm::AMDGPU::HSAMD::VersionMinorV4
constexpr uint32_t VersionMinorV4
HSA metadata minor version for code object V4.
Definition: AMDGPUMetadata.h:45
llvm::AMDGPU::HSAMD::toString
std::error_code toString(Metadata HSAMetadata, std::string &String)
Converts HSAMetadata to String.
Definition: AMDGPUMetadata.cpp:219