AMDGPUMetadata.h 18 KB

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