[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 8 07:52:23 PST 2021
yaxunl added a comment.
One drawback of this approach is that it does not work for LLVM modules generated from assembly or programmatically e.g. Tensorflow XLA.
Another drawback is that if `__ockl_call_host_function` or `__ockl_fprintf_stderr_begin` are eliminated by optimizer, the module flag is still kept. This could happen if users use printf in assert.
Is there a way to detect use of hostcall later in LLVM IR not by calling of these functions?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115283/new/
https://reviews.llvm.org/D115283
More information about the cfe-commits
mailing list