yaxunl added a comment.

In https://reviews.llvm.org/D52891#1258070, @scott.linder wrote:

> I will update the patch to modify the HIP toolchain and to add tests for 
> global variables.
>
> As far as the semantics are concerned, are we OK with this being AMDGPU only? 
> I do not see a means of determining what is a "kernel" in a language-agnostic 
> way other than checking for our AMDGPU-specific calling convention. If there 
> is a more general mechanism, this could be implemented in 
> `LinkageComputer::getLVForNamespaceScopeDecl` instead. As it stands, it 
> sounds like being AMDGPU specific, but omitting `amdgpu` from the option name 
> is preferred?


The checking of kernel functions can be made target independent. For now we 
only need to consider OpenCL and CUDA/HIP.  We can check function attribute 
AT_CUDAGlobal and AT_OpenCLKernel. Then this option can be made target 
independent. HCC can add its own check out of tree.

> What about:
> 
>   -fvisibility-non-offload-functions=<arg>

This name looks good to me.


https://reviews.llvm.org/D52891



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

Reply via email to