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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to