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

2023-06-06 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGf2677afe9159: [CUDA][HIP] Externalize device var in anonymous namespace (authored by yaxunl). Herald added a

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

2023-06-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/anon-ns.cu:46 + +// COMMON-DAG: @[[STR1:.*]] = {{.*}} c"[[KERN1]]\00" +// COMMON-DAG: @[[STR2:.*]] = {{.*}} c"[[KERN2]]\00" tra wrote: > Nit: I'd rename the

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

2023-06-05 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGenCUDA/anon-ns.cu:46 + +// COMMON-DAG: @[[STR1:.*]] = {{.*}} c"[[KERN1]]\00" +// COMMON-DAG: @[[STR2:.*]] = {{.*}} c"[[KERN2]]\00"

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

2023-06-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 528447. yaxunl added a comment. add a test to make sure device var in an anonymous namespace is not externalized if used by device code only. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152164/new/ https://reviews.llvm.org/D152164 Files: clang/

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

2023-06-05 Thread Yaxun Liu via Phabricator via cfe-commits
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