[PATCH] D121951: [AMDGPU][OpenCL] Add "amdgpu-no-hostcall-ptr" in Clang codegen pre-COV_5
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 25 06:10:27 PDT 2022
arsenm added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9381
+ M.getTarget().getTargetOpts().CodeObjectVersion != 500) {
+ F->addFnAttr("amdgpu-no-hostcall-ptr");
+ }
----------------
sameerds wrote:
> The frontend does not need to worry about this attribute. See the comment in the MetadataStreamer. A worthwhile check would be to generate an error if we are able to detect that some hostcall service is being used in OpenCL on code-object-v4 or lower. None exists right now, but we should add the check if such services show up. But those checks are likely to be in a different place. For example, enabling asan on OpenCL for code-object-v4 should result in an error in the place where asan commandline options are parsed.
Should be all opencl, not just kernels. Also < instead of !=?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121951/new/
https://reviews.llvm.org/D121951
More information about the cfe-commits
mailing list