Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:27

0001 //===--- AMDGPUMetadata.h ---------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 /// \file
0010 /// AMDGPU metadata definitions and in-memory representations.
0011 ///
0012 //
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_SUPPORT_AMDGPUMETADATA_H
0016 #define LLVM_SUPPORT_AMDGPUMETADATA_H
0017 
0018 #include "llvm/ADT/StringRef.h"
0019 #include <cstdint>
0020 #include <string>
0021 #include <system_error>
0022 #include <vector>
0023 
0024 namespace llvm {
0025 namespace AMDGPU {
0026 
0027 //===----------------------------------------------------------------------===//
0028 // HSA metadata.
0029 //===----------------------------------------------------------------------===//
0030 namespace HSAMD {
0031 
0032 /// HSA metadata major version for code object V3.
0033 constexpr uint32_t VersionMajorV3 = 1;
0034 /// HSA metadata minor version for code object V3.
0035 constexpr uint32_t VersionMinorV3 = 0;
0036 
0037 /// HSA metadata major version for code object V4.
0038 constexpr uint32_t VersionMajorV4 = 1;
0039 /// HSA metadata minor version for code object V4.
0040 constexpr uint32_t VersionMinorV4 = 1;
0041 
0042 /// HSA metadata major version for code object V5.
0043 constexpr uint32_t VersionMajorV5 = 1;
0044 /// HSA metadata minor version for code object V5.
0045 constexpr uint32_t VersionMinorV5 = 2;
0046 
0047 /// HSA metadata major version for code object V6.
0048 constexpr uint32_t VersionMajorV6 = 1;
0049 /// HSA metadata minor version for code object V6.
0050 constexpr uint32_t VersionMinorV6 = 2;
0051 
0052 /// Old HSA metadata beginning assembler directive for V2. This is only used for
0053 /// diagnostics now.
0054 
0055 /// HSA metadata beginning assembler directive.
0056 constexpr char AssemblerDirectiveBegin[] = ".amd_amdgpu_hsa_metadata";
0057 
0058 /// Access qualifiers.
0059 enum class AccessQualifier : uint8_t {
0060   Default   = 0,
0061   ReadOnly  = 1,
0062   WriteOnly = 2,
0063   ReadWrite = 3,
0064   Unknown   = 0xff
0065 };
0066 
0067 /// Address space qualifiers.
0068 enum class AddressSpaceQualifier : uint8_t {
0069   Private  = 0,
0070   Global   = 1,
0071   Constant = 2,
0072   Local    = 3,
0073   Generic  = 4,
0074   Region   = 5,
0075   Unknown  = 0xff
0076 };
0077 
0078 /// Value kinds.
0079 enum class ValueKind : uint8_t {
0080   ByValue                = 0,
0081   GlobalBuffer           = 1,
0082   DynamicSharedPointer   = 2,
0083   Sampler                = 3,
0084   Image                  = 4,
0085   Pipe                   = 5,
0086   Queue                  = 6,
0087   HiddenGlobalOffsetX    = 7,
0088   HiddenGlobalOffsetY    = 8,
0089   HiddenGlobalOffsetZ    = 9,
0090   HiddenNone             = 10,
0091   HiddenPrintfBuffer     = 11,
0092   HiddenDefaultQueue     = 12,
0093   HiddenCompletionAction = 13,
0094   HiddenMultiGridSyncArg = 14,
0095   HiddenHostcallBuffer   = 15,
0096   Unknown                = 0xff
0097 };
0098 
0099 /// Value types. This is deprecated and only remains for compatibility parsing
0100 /// of old metadata.
0101 enum class ValueType : uint8_t {
0102   Struct  = 0,
0103   I8      = 1,
0104   U8      = 2,
0105   I16     = 3,
0106   U16     = 4,
0107   F16     = 5,
0108   I32     = 6,
0109   U32     = 7,
0110   F32     = 8,
0111   I64     = 9,
0112   U64     = 10,
0113   F64     = 11,
0114   Unknown = 0xff
0115 };
0116 
0117 //===----------------------------------------------------------------------===//
0118 // Kernel Metadata.
0119 //===----------------------------------------------------------------------===//
0120 namespace Kernel {
0121 
0122 //===----------------------------------------------------------------------===//
0123 // Kernel Attributes Metadata.
0124 //===----------------------------------------------------------------------===//
0125 namespace Attrs {
0126 
0127 namespace Key {
0128 /// Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
0129 constexpr char ReqdWorkGroupSize[] = "ReqdWorkGroupSize";
0130 /// Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
0131 constexpr char WorkGroupSizeHint[] = "WorkGroupSizeHint";
0132 /// Key for Kernel::Attr::Metadata::mVecTypeHint.
0133 constexpr char VecTypeHint[] = "VecTypeHint";
0134 /// Key for Kernel::Attr::Metadata::mRuntimeHandle.
0135 constexpr char RuntimeHandle[] = "RuntimeHandle";
0136 } // end namespace Key
0137 
0138 /// In-memory representation of kernel attributes metadata.
0139 struct Metadata final {
0140   /// 'reqd_work_group_size' attribute. Optional.
0141   std::vector<uint32_t> mReqdWorkGroupSize = std::vector<uint32_t>();
0142   /// 'work_group_size_hint' attribute. Optional.
0143   std::vector<uint32_t> mWorkGroupSizeHint = std::vector<uint32_t>();
0144   /// 'vec_type_hint' attribute. Optional.
0145   std::string mVecTypeHint = std::string();
0146   /// External symbol created by runtime to store the kernel address
0147   /// for enqueued blocks.
0148   std::string mRuntimeHandle = std::string();
0149 
0150   /// Default constructor.
0151   Metadata() = default;
0152 
0153   /// \returns True if kernel attributes metadata is empty, false otherwise.
0154   bool empty() const {
0155     return !notEmpty();
0156   }
0157 
0158   /// \returns True if kernel attributes metadata is not empty, false otherwise.
0159   bool notEmpty() const {
0160     return !mReqdWorkGroupSize.empty() || !mWorkGroupSizeHint.empty() ||
0161            !mVecTypeHint.empty() || !mRuntimeHandle.empty();
0162   }
0163 };
0164 
0165 } // end namespace Attrs
0166 
0167 //===----------------------------------------------------------------------===//
0168 // Kernel Argument Metadata.
0169 //===----------------------------------------------------------------------===//
0170 namespace Arg {
0171 
0172 namespace Key {
0173 /// Key for Kernel::Arg::Metadata::mName.
0174 constexpr char Name[] = "Name";
0175 /// Key for Kernel::Arg::Metadata::mTypeName.
0176 constexpr char TypeName[] = "TypeName";
0177 /// Key for Kernel::Arg::Metadata::mSize.
0178 constexpr char Size[] = "Size";
0179 /// Key for Kernel::Arg::Metadata::mOffset.
0180 constexpr char Offset[] = "Offset";
0181 /// Key for Kernel::Arg::Metadata::mAlign.
0182 constexpr char Align[] = "Align";
0183 /// Key for Kernel::Arg::Metadata::mValueKind.
0184 constexpr char ValueKind[] = "ValueKind";
0185 /// Key for Kernel::Arg::Metadata::mValueType. (deprecated)
0186 constexpr char ValueType[] = "ValueType";
0187 /// Key for Kernel::Arg::Metadata::mPointeeAlign.
0188 constexpr char PointeeAlign[] = "PointeeAlign";
0189 /// Key for Kernel::Arg::Metadata::mAddrSpaceQual.
0190 constexpr char AddrSpaceQual[] = "AddrSpaceQual";
0191 /// Key for Kernel::Arg::Metadata::mAccQual.
0192 constexpr char AccQual[] = "AccQual";
0193 /// Key for Kernel::Arg::Metadata::mActualAccQual.
0194 constexpr char ActualAccQual[] = "ActualAccQual";
0195 /// Key for Kernel::Arg::Metadata::mIsConst.
0196 constexpr char IsConst[] = "IsConst";
0197 /// Key for Kernel::Arg::Metadata::mIsRestrict.
0198 constexpr char IsRestrict[] = "IsRestrict";
0199 /// Key for Kernel::Arg::Metadata::mIsVolatile.
0200 constexpr char IsVolatile[] = "IsVolatile";
0201 /// Key for Kernel::Arg::Metadata::mIsPipe.
0202 constexpr char IsPipe[] = "IsPipe";
0203 } // end namespace Key
0204 
0205 /// In-memory representation of kernel argument metadata.
0206 struct Metadata final {
0207   /// Name. Optional.
0208   std::string mName = std::string();
0209   /// Type name. Optional.
0210   std::string mTypeName = std::string();
0211   /// Size in bytes. Required.
0212   uint32_t mSize = 0;
0213   /// Offset in bytes. Required for code object v3, unused for code object v2.
0214   uint32_t mOffset = 0;
0215   /// Alignment in bytes. Required.
0216   uint32_t mAlign = 0;
0217   /// Value kind. Required.
0218   ValueKind mValueKind = ValueKind::Unknown;
0219   /// Pointee alignment in bytes. Optional.
0220   uint32_t mPointeeAlign = 0;
0221   /// Address space qualifier. Optional.
0222   AddressSpaceQualifier mAddrSpaceQual = AddressSpaceQualifier::Unknown;
0223   /// Access qualifier. Optional.
0224   AccessQualifier mAccQual = AccessQualifier::Unknown;
0225   /// Actual access qualifier. Optional.
0226   AccessQualifier mActualAccQual = AccessQualifier::Unknown;
0227   /// True if 'const' qualifier is specified. Optional.
0228   bool mIsConst = false;
0229   /// True if 'restrict' qualifier is specified. Optional.
0230   bool mIsRestrict = false;
0231   /// True if 'volatile' qualifier is specified. Optional.
0232   bool mIsVolatile = false;
0233   /// True if 'pipe' qualifier is specified. Optional.
0234   bool mIsPipe = false;
0235 
0236   /// Default constructor.
0237   Metadata() = default;
0238 };
0239 
0240 } // end namespace Arg
0241 
0242 //===----------------------------------------------------------------------===//
0243 // Kernel Code Properties Metadata.
0244 //===----------------------------------------------------------------------===//
0245 namespace CodeProps {
0246 
0247 namespace Key {
0248 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
0249 constexpr char KernargSegmentSize[] = "KernargSegmentSize";
0250 /// Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
0251 constexpr char GroupSegmentFixedSize[] = "GroupSegmentFixedSize";
0252 /// Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
0253 constexpr char PrivateSegmentFixedSize[] = "PrivateSegmentFixedSize";
0254 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
0255 constexpr char KernargSegmentAlign[] = "KernargSegmentAlign";
0256 /// Key for Kernel::CodeProps::Metadata::mWavefrontSize.
0257 constexpr char WavefrontSize[] = "WavefrontSize";
0258 /// Key for Kernel::CodeProps::Metadata::mNumSGPRs.
0259 constexpr char NumSGPRs[] = "NumSGPRs";
0260 /// Key for Kernel::CodeProps::Metadata::mNumVGPRs.
0261 constexpr char NumVGPRs[] = "NumVGPRs";
0262 /// Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
0263 constexpr char MaxFlatWorkGroupSize[] = "MaxFlatWorkGroupSize";
0264 /// Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
0265 constexpr char IsDynamicCallStack[] = "IsDynamicCallStack";
0266 /// Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
0267 constexpr char IsXNACKEnabled[] = "IsXNACKEnabled";
0268 /// Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
0269 constexpr char NumSpilledSGPRs[] = "NumSpilledSGPRs";
0270 /// Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
0271 constexpr char NumSpilledVGPRs[] = "NumSpilledVGPRs";
0272 } // end namespace Key
0273 
0274 /// In-memory representation of kernel code properties metadata.
0275 struct Metadata final {
0276   /// Size in bytes of the kernarg segment memory. Kernarg segment memory
0277   /// holds the values of the arguments to the kernel. Required.
0278   uint64_t mKernargSegmentSize = 0;
0279   /// Size in bytes of the group segment memory required by a workgroup.
0280   /// This value does not include any dynamically allocated group segment memory
0281   /// that may be added when the kernel is dispatched. Required.
0282   uint32_t mGroupSegmentFixedSize = 0;
0283   /// Size in bytes of the private segment memory required by a workitem.
0284   /// Private segment memory includes arg, spill and private segments. Required.
0285   uint32_t mPrivateSegmentFixedSize = 0;
0286   /// Maximum byte alignment of variables used by the kernel in the
0287   /// kernarg memory segment. Required.
0288   uint32_t mKernargSegmentAlign = 0;
0289   /// Wavefront size. Required.
0290   uint32_t mWavefrontSize = 0;
0291   /// Total number of SGPRs used by a wavefront. Optional.
0292   uint16_t mNumSGPRs = 0;
0293   /// Total number of VGPRs used by a workitem. Optional.
0294   uint16_t mNumVGPRs = 0;
0295   /// Maximum flat work-group size supported by the kernel. Optional.
0296   uint32_t mMaxFlatWorkGroupSize = 0;
0297   /// True if the generated machine code is using a dynamically sized
0298   /// call stack. Optional.
0299   bool mIsDynamicCallStack = false;
0300   /// True if the generated machine code is capable of supporting XNACK.
0301   /// Optional.
0302   bool mIsXNACKEnabled = false;
0303   /// Number of SGPRs spilled by a wavefront. Optional.
0304   uint16_t mNumSpilledSGPRs = 0;
0305   /// Number of VGPRs spilled by a workitem. Optional.
0306   uint16_t mNumSpilledVGPRs = 0;
0307 
0308   /// Default constructor.
0309   Metadata() = default;
0310 
0311   /// \returns True if kernel code properties metadata is empty, false
0312   /// otherwise.
0313   bool empty() const {
0314     return !notEmpty();
0315   }
0316 
0317   /// \returns True if kernel code properties metadata is not empty, false
0318   /// otherwise.
0319   bool notEmpty() const {
0320     return true;
0321   }
0322 };
0323 
0324 } // end namespace CodeProps
0325 
0326 //===----------------------------------------------------------------------===//
0327 // Kernel Debug Properties Metadata.
0328 //===----------------------------------------------------------------------===//
0329 namespace DebugProps {
0330 
0331 namespace Key {
0332 /// Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
0333 constexpr char DebuggerABIVersion[] = "DebuggerABIVersion";
0334 /// Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
0335 constexpr char ReservedNumVGPRs[] = "ReservedNumVGPRs";
0336 /// Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
0337 constexpr char ReservedFirstVGPR[] = "ReservedFirstVGPR";
0338 /// Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
0339 constexpr char PrivateSegmentBufferSGPR[] = "PrivateSegmentBufferSGPR";
0340 /// Key for
0341 ///     Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
0342 constexpr char WavefrontPrivateSegmentOffsetSGPR[] =
0343     "WavefrontPrivateSegmentOffsetSGPR";
0344 } // end namespace Key
0345 
0346 /// In-memory representation of kernel debug properties metadata.
0347 struct Metadata final {
0348   /// Debugger ABI version. Optional.
0349   std::vector<uint32_t> mDebuggerABIVersion = std::vector<uint32_t>();
0350   /// Consecutive number of VGPRs reserved for debugger use. Must be 0 if
0351   /// mDebuggerABIVersion is not set. Optional.
0352   uint16_t mReservedNumVGPRs = 0;
0353   /// First fixed VGPR reserved. Must be uint16_t(-1) if
0354   /// mDebuggerABIVersion is not set or mReservedFirstVGPR is 0. Optional.
0355   uint16_t mReservedFirstVGPR = uint16_t(-1);
0356   /// Fixed SGPR of the first of 4 SGPRs used to hold the scratch V# used
0357   /// for the entire kernel execution. Must be uint16_t(-1) if
0358   /// mDebuggerABIVersion is not set or SGPR not used or not known. Optional.
0359   uint16_t mPrivateSegmentBufferSGPR = uint16_t(-1);
0360   /// Fixed SGPR used to hold the wave scratch offset for the entire
0361   /// kernel execution. Must be uint16_t(-1) if mDebuggerABIVersion is not set
0362   /// or SGPR is not used or not known. Optional.
0363   uint16_t mWavefrontPrivateSegmentOffsetSGPR = uint16_t(-1);
0364 
0365   /// Default constructor.
0366   Metadata() = default;
0367 
0368   /// \returns True if kernel debug properties metadata is empty, false
0369   /// otherwise.
0370   bool empty() const {
0371     return !notEmpty();
0372   }
0373 
0374   /// \returns True if kernel debug properties metadata is not empty, false
0375   /// otherwise.
0376   bool notEmpty() const {
0377     return !mDebuggerABIVersion.empty();
0378   }
0379 };
0380 
0381 } // end namespace DebugProps
0382 
0383 namespace Key {
0384 /// Key for Kernel::Metadata::mName.
0385 constexpr char Name[] = "Name";
0386 /// Key for Kernel::Metadata::mSymbolName.
0387 constexpr char SymbolName[] = "SymbolName";
0388 /// Key for Kernel::Metadata::mLanguage.
0389 constexpr char Language[] = "Language";
0390 /// Key for Kernel::Metadata::mLanguageVersion.
0391 constexpr char LanguageVersion[] = "LanguageVersion";
0392 /// Key for Kernel::Metadata::mAttrs.
0393 constexpr char Attrs[] = "Attrs";
0394 /// Key for Kernel::Metadata::mArgs.
0395 constexpr char Args[] = "Args";
0396 /// Key for Kernel::Metadata::mCodeProps.
0397 constexpr char CodeProps[] = "CodeProps";
0398 /// Key for Kernel::Metadata::mDebugProps.
0399 constexpr char DebugProps[] = "DebugProps";
0400 } // end namespace Key
0401 
0402 /// In-memory representation of kernel metadata.
0403 struct Metadata final {
0404   /// Kernel source name. Required.
0405   std::string mName = std::string();
0406   /// Kernel descriptor name. Required.
0407   std::string mSymbolName = std::string();
0408   /// Language. Optional.
0409   std::string mLanguage = std::string();
0410   /// Language version. Optional.
0411   std::vector<uint32_t> mLanguageVersion = std::vector<uint32_t>();
0412   /// Attributes metadata. Optional.
0413   Attrs::Metadata mAttrs = Attrs::Metadata();
0414   /// Arguments metadata. Optional.
0415   std::vector<Arg::Metadata> mArgs = std::vector<Arg::Metadata>();
0416   /// Code properties metadata. Optional.
0417   CodeProps::Metadata mCodeProps = CodeProps::Metadata();
0418   /// Debug properties metadata. Optional.
0419   DebugProps::Metadata mDebugProps = DebugProps::Metadata();
0420 
0421   /// Default constructor.
0422   Metadata() = default;
0423 };
0424 
0425 } // end namespace Kernel
0426 
0427 namespace Key {
0428 /// Key for HSA::Metadata::mVersion.
0429 constexpr char Version[] = "Version";
0430 /// Key for HSA::Metadata::mPrintf.
0431 constexpr char Printf[] = "Printf";
0432 /// Key for HSA::Metadata::mKernels.
0433 constexpr char Kernels[] = "Kernels";
0434 } // end namespace Key
0435 
0436 /// In-memory representation of HSA metadata.
0437 struct Metadata final {
0438   /// HSA metadata version. Required.
0439   std::vector<uint32_t> mVersion = std::vector<uint32_t>();
0440   /// Printf metadata. Optional.
0441   std::vector<std::string> mPrintf = std::vector<std::string>();
0442   /// Kernels metadata. Required.
0443   std::vector<Kernel::Metadata> mKernels = std::vector<Kernel::Metadata>();
0444 
0445   /// Default constructor.
0446   Metadata() = default;
0447 };
0448 
0449 /// Converts \p String to \p HSAMetadata.
0450 std::error_code fromString(StringRef String, Metadata &HSAMetadata);
0451 
0452 /// Converts \p HSAMetadata to \p String.
0453 std::error_code toString(Metadata HSAMetadata, std::string &String);
0454 
0455 //===----------------------------------------------------------------------===//
0456 // HSA metadata for v3 code object.
0457 //===----------------------------------------------------------------------===//
0458 namespace V3 {
0459 /// HSA metadata major version.
0460 constexpr uint32_t VersionMajor = 1;
0461 /// HSA metadata minor version.
0462 constexpr uint32_t VersionMinor = 0;
0463 
0464 /// HSA metadata beginning assembler directive.
0465 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_metadata";
0466 /// HSA metadata ending assembler directive.
0467 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_metadata";
0468 } // end namespace V3
0469 
0470 } // end namespace HSAMD
0471 
0472 //===----------------------------------------------------------------------===//
0473 // PAL metadata.
0474 //===----------------------------------------------------------------------===//
0475 namespace PALMD {
0476 
0477 /// PAL metadata (old linear format) assembler directive.
0478 constexpr char AssemblerDirective[] = ".amd_amdgpu_pal_metadata";
0479 
0480 /// PAL metadata (new MsgPack format) beginning assembler directive.
0481 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_pal_metadata";
0482 
0483 /// PAL metadata (new MsgPack format) ending assembler directive.
0484 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_pal_metadata";
0485 
0486 /// PAL metadata keys.
0487 enum Key : uint32_t {
0488   R_2E12_COMPUTE_PGM_RSRC1 = 0x2e12,
0489   R_2D4A_SPI_SHADER_PGM_RSRC1_LS = 0x2d4a,
0490   R_2D0A_SPI_SHADER_PGM_RSRC1_HS = 0x2d0a,
0491   R_2CCA_SPI_SHADER_PGM_RSRC1_ES = 0x2cca,
0492   R_2C8A_SPI_SHADER_PGM_RSRC1_GS = 0x2c8a,
0493   R_2C4A_SPI_SHADER_PGM_RSRC1_VS = 0x2c4a,
0494   R_2C0A_SPI_SHADER_PGM_RSRC1_PS = 0x2c0a,
0495   R_2E00_COMPUTE_DISPATCH_INITIATOR = 0x2e00,
0496   R_A1B3_SPI_PS_INPUT_ENA = 0xa1b3,
0497   R_A1B4_SPI_PS_INPUT_ADDR = 0xa1b4,
0498   R_A1B6_SPI_PS_IN_CONTROL = 0xa1b6,
0499   R_A2D5_VGT_SHADER_STAGES_EN = 0xa2d5,
0500 
0501   LS_NUM_USED_VGPRS = 0x10000021,
0502   HS_NUM_USED_VGPRS = 0x10000022,
0503   ES_NUM_USED_VGPRS = 0x10000023,
0504   GS_NUM_USED_VGPRS = 0x10000024,
0505   VS_NUM_USED_VGPRS = 0x10000025,
0506   PS_NUM_USED_VGPRS = 0x10000026,
0507   CS_NUM_USED_VGPRS = 0x10000027,
0508 
0509   LS_NUM_USED_SGPRS = 0x10000028,
0510   HS_NUM_USED_SGPRS = 0x10000029,
0511   ES_NUM_USED_SGPRS = 0x1000002a,
0512   GS_NUM_USED_SGPRS = 0x1000002b,
0513   VS_NUM_USED_SGPRS = 0x1000002c,
0514   PS_NUM_USED_SGPRS = 0x1000002d,
0515   CS_NUM_USED_SGPRS = 0x1000002e,
0516 
0517   LS_SCRATCH_SIZE = 0x10000044,
0518   HS_SCRATCH_SIZE = 0x10000045,
0519   ES_SCRATCH_SIZE = 0x10000046,
0520   GS_SCRATCH_SIZE = 0x10000047,
0521   VS_SCRATCH_SIZE = 0x10000048,
0522   PS_SCRATCH_SIZE = 0x10000049,
0523   CS_SCRATCH_SIZE = 0x1000004a
0524 };
0525 
0526 } // end namespace PALMD
0527 } // end namespace AMDGPU
0528 } // end namespace llvm
0529 
0530 #endif // LLVM_SUPPORT_AMDGPUMETADATA_H