[AMDGPU] add support for hostcall buffer pointer as hidden kernel argument
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Tue, 19 Nov 2019 08:35:39 +0000 (14:05 +0530)
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Wed, 20 Nov 2019 10:23:55 +0000 (15:53 +0530)
commit52c5014da099797e9f1f6c90acddf79a68aa85cb
treeed25183186a703e2feec5ce7ad864cb41d415237
parentf67534afd6f237d3ec00c207b26579968c3d60e5
[AMDGPU] add support for hostcall buffer pointer as hidden kernel argument

Hostcall is a service that allows a kernel to submit requests to the
host using shared buffers, and block until a response is
received. This will eventually replace the shared buffer currently
used for printf, and repurposes the same hidden kernel argument. This
change introduces a new ValueKind in the HSA metadata to represent the
hostcall buffer.

Differential Revision: https://reviews.llvm.org/D70038
13 files changed:
llvm/docs/AMDGPUUsage.rst
llvm/include/llvm/Support/AMDGPUMetadata.h
llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
llvm/lib/Support/AMDGPUMetadata.cpp
llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
llvm/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full-v3.ll
llvm/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ir-full.ll
llvm/test/CodeGen/AMDGPU/hsa-metadata-hostcall-absent-v3.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/hsa-metadata-hostcall-absent.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/hsa-metadata-hostcall-present-v3.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/hsa-metadata-hostcall-present.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/opencl-printf-no-hostcall.ll [new file with mode: 0644]