[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 10:30:00 PDT 2019
tra added a comment.
In D62603#1521484 <https://reviews.llvm.org/D62603#1521484>, @hliao wrote:
> thanks, but that `static __device__` variable won't have shadow in host anymore.
Why not? Your change only changes whether `externally_initialized` is applied to the variable during device-side compilation. It does not change what happens on the host side.
AFAICT, it will still be generated on the host side and the host side should still be able to take its address.
NVCC also allows that: https://godbolt.org/z/t78RvM
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62603/new/
https://reviews.llvm.org/D62603
More information about the cfe-commits
mailing list