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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 10:21:00 PST 2020


yaxunl added a comment.

In D75402#1901370 <https://reviews.llvm.org/D75402#1901370>, @hsmhsm wrote:

> In D75402#1901361 <https://reviews.llvm.org/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 global extern var declaration to become a global definition. And. moreover, it is not a new change from my side, I just happen to add a comment.


This kind of variable is supposed to be an external variable which is initialized by runtime at run time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75402/new/

https://reviews.llvm.org/D75402





More information about the cfe-commits mailing list