commit | ea83bd5e7841f69f3f7b524edbcc3d298b409de7 | [log] [tgz] |
---|---|---|
author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | Wed Mar 17 16:14:03 2021 -0400 |
committer | Copybara-Service <copybara-worker@google.com> | Sat Apr 17 21:19:47 2021 -0700 |
tree | bf4d3c4443079e52cb8ea503b15b51cc137469e7 | |
parent | 5f1a59c41d832beebb1955947105feb17ef519d9 [diff] |
[CUDA][HIP] Mark device var used by host only Add device variables to llvm.compiler.used if they are ODR-used by either host or device functions. This is necessary to prevent them from being eliminated by whole-program optimization where the compiler has no way to know a device variable is used by some host code. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D98814 GitOrigin-RevId: d5c0f00e216aa6797499bb4c8aacac930d8a819b