[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-03 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG0b2af1a28894: [NFC][CUDA] Refactor registering device variable (authored by yaxunl). Herald added a project: clang. Changed prior to commit:

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4270-4271 } else { - // Host-side shadows of external declarations of device-side - // global variables become internal definitions. These have to - // be internal in order to

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4270-4271 } else { - // Host-side shadows of external declarations of device-side - // global variables become internal definitions. These have

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4270-4271 } else { - // Host-side shadows of external declarations of device-side - // global variables become internal definitions. These have to - // be internal in order to prevent

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:924 + +void CGNVCUDARuntime::adjustShadowVarLinkage( +const VarDecl *D, llvm::GlobalValue::LinkageTypes ) { tra wrote: > yaxunl wrote: > > tra

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-01 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Couple of minor nits LGTM otherwise, Comment at: clang/lib/CodeGen/CGCUDANV.cpp:924 + +void CGNVCUDARuntime::adjustShadowVarLinkage( +const VarDecl *D,

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 320526. yaxunl marked 4 inline comments as done. yaxunl added a comment. Revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95558/new/ https://reviews.llvm.org/D95558 Files: clang/lib/CodeGen/CGCUDANV.cpp

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-02-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:157 llvm::Function *makeModuleDtorFunction() override; + void + adjustShadowVarLinkage(const VarDecl *D, tra wrote: > clang-format it? `void`

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-01-27 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:157 llvm::Function *makeModuleDtorFunction() override; + void + adjustShadowVarLinkage(const VarDecl *D, clang-format it? `void` hanging all by itself looks odd.

[PATCH] D95558: [NFC][CUDA] Refactor registering device variable

2021-01-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Extract registering device variable to CUDA runtime codegen function since it will be called in multiple places. https://reviews.llvm.org/D95558 Files: clang/lib/CodeGen/CGCUDANV.cpp