[PATCH] D152164: [CUDA][HIP] Externalize device var in anonymous namespace

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 07:27:35 PDT 2023


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a subscriber: mattd.
Herald added a project: All.
yaxunl requested review of this revision.

Device variables in an anonymous namespace may be
referenced by host code, therefore they need to
be externalized in a similar way as a static device
variables or kernels in an anonymous namespace.

Fixes: https://github.com/ROCm-Developer-Tools/HIP/issues/3246


https://reviews.llvm.org/D152164

Files:
  clang/lib/AST/ASTContext.cpp
  clang/test/CodeGenCUDA/anon-ns.cu
  clang/test/CodeGenCUDA/kernel-in-anon-ns.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152164.528432.patch
Type: text/x-patch
Size: 5404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230605/10e0ab10/attachment-0001.bin>


More information about the cfe-commits mailing list