[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 11:56:56 PDT 2022


jhuber6 added a comment.

In D130096#3663295 <https://reviews.llvm.org/D130096#3663295>, @yaxunl wrote:

> There is no constant propagation for globals with weak linage, right? Otherwise, it won't work. My concern is that there may be optimization passes which do not respect the weak linkage and uses the incorrect default value for OpenCL or HIP. Therefore I am not very confident to enable this for OpenCL or HIP unless these variables have the correct value based on the compilation options.

Instead of `weak_odr` we could probably use add this to compiler used instead if that's an issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130096



More information about the cfe-commits mailing list