[PATCH] D110337: [AMDGPU] Use "hostcall" module flag instead of searching for ockl_hostcall_internal() declaration.
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 12:32:10 PDT 2021
yaxunl added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:66
auto Fn = M->getOrInsertFunction("__ockl_printf_begin", Int64Ty, Int64Ty);
+ M->addModuleFlag(llvm::Module::Error, "hostcall", 1);
return Builder.CreateCall(Fn, Version);
----------------
Should be "Override" since a module needing hostcall overrides a module not needing hostcall.
Also the name of the flag better be "amdgpu_hostcall" to avoid conflict with other targets.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110337/new/
https://reviews.llvm.org/D110337
More information about the llvm-commits
mailing list