[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-02-29 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm created this revision. hsmhsm added reviewers: yaxunl, tra. Herald added a project: clang. Herald added a subscriber: cfe-commits. hip-pinned-shadow global var should remain in the final code object irrespective of whether it is used or not within the code. Add it to used list, so that it w

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https://reviews.llvm.org/D75402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. the assertion in addUsedGlobal should not be removed. that will remove the guard for potential bugs Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); -

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hliao wrote: > This check should be removed completely instead it should be revised for

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hsmhsm wrote: > yaxunl wrote: > > hliao wrote: > > > This check should be removed complet

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm marked an inline comment as done. hsmhsm added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); yaxunl wrote: > hliao wrote: > > This check sho

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. BTW, why that variable cannot have an initializer? Suppose that initializer is a trivial one, initializing to 0, would that cause any issue in the compilation? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https:/

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm marked an inline comment as done. hsmhsm added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hliao wrote: > hsmhsm wrote: > > yaxunl wrote:

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm added a comment. In D75402#1901361 , @hliao wrote: > BTW, why that variable cannot have an initializer? Suppose that initializer > is a trivial one, initializing to 0, would that cause any issue in the > compilation? Initialization makes the glo

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75402#1901370 , @hsmhsm wrote: > In D75402#1901361 , @hliao wrote: > > > BTW, why that variable cannot have an initializer? Suppose that initializer > > is a trivial one, initializing to

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm updated this revision to Diff 247689. hsmhsm added a comment. Take care review comments by hliao. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https://reviews.llvm.org/D75402 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-03 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm added a comment. In D75402#1901471 , @hsmhsm wrote: > Take care review comments by hliao. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https://reviews.llvm.org/D75402 __

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https://reviews.llvm.org/D75402 __

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-03 Thread Mahesha S via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcac068600e55: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code (authored by hsmhsm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.