[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 5 05:43:37 PDT 2023
jhuber6 wrote:
> This stuff looks very cuda/opencl specific. It's definitely surprising for C++ code. Do we need it for openmp? If not it seems better to guard the hack with visibility behind if (hip)
You reminded me that I need to refine this logic as well. What it's doing here is basically the same as what we want to happen. If someone uses `#pragma omp declare target` on a variable without `device_type(nohost)` that means the host runtime will need to register it. If it's hidden then that will be a lookup error. I refined the logic to do the same handling for OpenMP, but ignore it if it's `DT_nohost` because then there's no registration code required.
https://github.com/llvm/llvm-project/pull/68264
More information about the cfe-commits
mailing list