[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: include/clang/Basic/Attr.td:955 +def CUDADeviceShadow : InheritableAttr { + let Spellings = [GNU<"device_shadow">, Declspec<"__device_shadow__">]; + let Subjects = SubjectList<[Var]>;

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Basic/Attr.td:954 +def CUDADeviceShadow : InheritableAttr { + let Spellings = [GNU<"device_shadow">, Declspec<"__device_shadow__">]; `HIPDeviceShadow` ? Comment at:

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:3775 + // left undefined. + bool IsHIPDeviceShadowVar = getLangOpts().HIP && getLangOpts().CUDAIsDevice && + D->hasAttr();

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. > The problem is that we do not see generic usage of > Although there is no texture specific handling on the compiler side, there > is texture specific handling of symbols Please ignore this comment. It is some old comment submitted by accident. CHANGES SINCE LAST

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D62738#1538900 , @tra wrote: > So, the only thing this patch appears to do is make everything with this > attribute uninitialized on device side and give protected visibility. > If I

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Overall looks good. Thank you for making the change. While reviewing the patch it occured to me that it presents an opportunity to generalize the shadow variables to work in both directions. See below. Comment at:

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 205503. yaxunl added a comment. Fix visibility and dso_local. Allow undefined symbol in code object. This is to allow merging the host and device symbols at run time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62738/new/

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 205490. yaxunl retitled this revision from "[HIP] Support texture type" to "[HIP] Support device_shadow variable". yaxunl edited the summary of this revision. yaxunl added a comment. Revised by Artem's comments. CHANGES SINCE LAST ACTION