Index: llvm/docs/AMDGPUUsage.rst =================================================================== --- llvm/docs/AMDGPUUsage.rst +++ llvm/docs/AMDGPUUsage.rst @@ -3571,6 +3571,11 @@ as the AQL dispatch packet dimensionality. Must be a value between 1 and 3. + "hidden_heap_v1" + A global address space pointer to an initialized memory + buffer that conforms to the requirements of the malloc/free + device library V1 version implementation. + "hidden_private_base" The high 32 bits of the flat addressing private aperture base. Only used by GFX8 to allow conversion between private segment Index: llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp =================================================================== --- llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp +++ llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp @@ -133,6 +133,7 @@ .Case("hidden_none", true) .Case("hidden_printf_buffer", true) .Case("hidden_hostcall_buffer", true) + .Case("hidden_heap_v1", true) .Case("hidden_default_queue", true) .Case("hidden_completion_action", true) .Case("hidden_multigrid_sync_arg", true) Index: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp =================================================================== --- llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp +++ llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp @@ -1020,9 +1020,8 @@ emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_multigrid_sync_arg", Offset, Args); - // Ignore temporarily until it is implemented. - // emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_heap_v1", Offset, Args); - Offset += 8; + // TODO: emit conditionally when the function attribute is defined. + emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_heap_v1", Offset, Args); if (Func.hasFnAttribute("calls-enqueue-kernel")) { emitKernelArg(DL, Int8PtrTy, Align(8), "hidden_default_queue", Offset,