AMDGPUMetadata.h 19 KB

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