diff options
Diffstat (limited to 'include/llvm/Support/AMDGPUMetadata.h')
-rw-r--r-- | include/llvm/Support/AMDGPUMetadata.h | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/include/llvm/Support/AMDGPUMetadata.h b/include/llvm/Support/AMDGPUMetadata.h index 84851c07499d..f7f1ec40dde9 100644 --- a/include/llvm/Support/AMDGPUMetadata.h +++ b/include/llvm/Support/AMDGPUMetadata.h @@ -1,9 +1,8 @@ //===--- AMDGPUMetadata.h ---------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -75,6 +74,7 @@ enum class ValueKind : uint8_t { HiddenPrintfBuffer = 11, HiddenDefaultQueue = 12, HiddenCompletionAction = 13, + HiddenMultiGridSyncArg = 14, Unknown = 0xff }; @@ -157,6 +157,8 @@ constexpr char Name[] = "Name"; constexpr char TypeName[] = "TypeName"; /// Key for Kernel::Arg::Metadata::mSize. constexpr char Size[] = "Size"; +/// Key for Kernel::Arg::Metadata::mOffset. +constexpr char Offset[] = "Offset"; /// Key for Kernel::Arg::Metadata::mAlign. constexpr char Align[] = "Align"; /// Key for Kernel::Arg::Metadata::mValueKind. @@ -189,6 +191,8 @@ struct Metadata final { std::string mTypeName = std::string(); /// Size in bytes. Required. uint32_t mSize = 0; + /// Offset in bytes. Required for code object v3, unused for code object v2. + uint32_t mOffset = 0; /// Alignment in bytes. Required. uint32_t mAlign = 0; /// Value kind. Required. @@ -453,11 +457,30 @@ constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_metadata"; //===----------------------------------------------------------------------===// namespace PALMD { -/// PAL metadata assembler directive. +/// PAL metadata (old linear format) assembler directive. constexpr char AssemblerDirective[] = ".amd_amdgpu_pal_metadata"; +/// PAL metadata (new MsgPack format) beginning assembler directive. +constexpr char AssemblerDirectiveBegin[] = ".amdgpu_pal_metadata"; + +/// PAL metadata (new MsgPack format) ending assembler directive. +constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_pal_metadata"; + /// PAL metadata keys. enum Key : uint32_t { + R_2E12_COMPUTE_PGM_RSRC1 = 0x2e12, + R_2D4A_SPI_SHADER_PGM_RSRC1_LS = 0x2d4a, + R_2D0A_SPI_SHADER_PGM_RSRC1_HS = 0x2d0a, + R_2CCA_SPI_SHADER_PGM_RSRC1_ES = 0x2cca, + R_2C8A_SPI_SHADER_PGM_RSRC1_GS = 0x2c8a, + R_2C4A_SPI_SHADER_PGM_RSRC1_VS = 0x2c4a, + R_2C0A_SPI_SHADER_PGM_RSRC1_PS = 0x2c0a, + R_2E00_COMPUTE_DISPATCH_INITIATOR = 0x2e00, + R_A1B3_SPI_PS_INPUT_ENA = 0xa1b3, + R_A1B4_SPI_PS_INPUT_ADDR = 0xa1b4, + R_A1B6_SPI_PS_IN_CONTROL = 0xa1b6, + R_A2D5_VGT_SHADER_STAGES_EN = 0xa2d5, + LS_NUM_USED_VGPRS = 0x10000021, HS_NUM_USED_VGPRS = 0x10000022, ES_NUM_USED_VGPRS = 0x10000023, @@ -483,12 +506,6 @@ enum Key : uint32_t { CS_SCRATCH_SIZE = 0x1000004a }; -/// PAL metadata represented as a vector. -typedef std::vector<uint32_t> Metadata; - -/// Converts \p PALMetadata to \p String. -std::error_code toString(const Metadata &PALMetadata, std::string &String); - } // end namespace PALMD } // end namespace AMDGPU } // end namespace llvm |