[AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic
authorScott Linder <Scott.Linder@amd.com>
Tue, 5 Apr 2022 18:49:33 +0000 (18:49 +0000)
committerScott Linder <Scott.Linder@amd.com>
Tue, 5 Apr 2022 19:10:23 +0000 (19:10 +0000)
commit09f33a430b72fffe06fde9e07c0acd5c4cd2e59e
tree99d726103bf8dc893e4e0c146af179e531567b72
parent84f0a36b14bbd464d65cb1a6135134072b828447
[AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic

The diagnostic is unreliable, and triggers even for dead uses of
hostcall that may exist when linking the device-libs at lower
optimization levels.

Eliminate the diagnostic, and directly document the limitation for
OpenCL before code object V5.

Make some NFC changes to clarify the related code in the
MetadataStreamer.

Add a clang test to tie OCL sources containing printf to the backend IR
tests for this situation.

Reviewed By: sameerds, arsenm, yaxunl

Differential Revision: https://reviews.llvm.org/D121951
clang/test/CodeGenOpenCL/amdgpu-printf.cl [new file with mode: 0644]
llvm/docs/AMDGPUUsage.rst
llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/opencl-printf-no-hostcall.ll [deleted file]