diff options
author | kpyzhov <konstantin.pyzhov@amd.com> | 2021-10-05 09:56:04 -0400 |
---|---|---|
committer | kpyzhov <konstantin.pyzhov@amd.com> | 2021-10-05 09:56:04 -0400 |
commit | 095c48fdf3d27a4f346f8680d1d7e89449bb557b (patch) | |
tree | 062b5f2f5b92d0d9a040c9b5a3959713a1d1b50a /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 80a645630660b1096aa16e18ed4747b24995f6cb (diff) | |
download | llvm-095c48fdf3d27a4f346f8680d1d7e89449bb557b.zip llvm-095c48fdf3d27a4f346f8680d1d7e89449bb557b.tar.gz llvm-095c48fdf3d27a4f346f8680d1d7e89449bb557b.tar.bz2 |
[AMDGPU] Use "hostcall" module flag instead of searching for ockl_hostcall_internal() declaration.
The current way to detect hostcalls by looking for "ockl_hostcall_internal()" function in the module seems to be not reliable enough. The LTO may rename the "ockl_hostcall_internal()" function when an application is compiled with "-fgpu-rdc", and MetadataStreamer pass to fail to detect hostcalls, therefore it does not set the "hidden_hostcall_buffer" kernel argument.
This change adds a new module flag: hostcall that can be used to detect whether GPU functions use host calls for printf.
Differential revision: https://reviews.llvm.org/D110337
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions