[PATCH] D95901: [CUDA][HIP] Fix device variable linkage
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 2 15:19:41 PST 2021
yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.
For -fgpu-rdc, shadow variables should not be internalized, otherwise
they cannot be accessed by other TUs. This is necessary because
the shadow variable of external device variables are always
emitted as undefined symbols, which need to resolve to a global
symbols.
Managed variables need to be emitted as undefined symbols
in device compilations.
https://reviews.llvm.org/D95901
Files:
clang/lib/AST/ASTContext.cpp
clang/lib/CodeGen/CGCUDANV.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCUDA/device-stub.cu
clang/test/CodeGenCUDA/device-var-linkage.cu
clang/test/CodeGenCUDA/managed-var.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95901.320923.patch
Type: text/x-patch
Size: 16745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210202/94edb5a0/attachment-0001.bin>
More information about the cfe-commits
mailing list