This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries
ClosedPublic

Authored by yaxunl on Aug 10 2018, 6:54 PM.

Details

Summary

Different shared libraries contain different fat binary, which is stored in a global variable
__hip_gpubin_handle. Since different compilation units share the same fat binary, this
variable has linkonce linkage. However, it should not be merged across different shared
libraries.

This patch set the visibility of the global variable to be hidden, which will make it invisible
in the shared library, therefore preventing it from being merged.

Diff Detail

Repository
rC Clang

Event Timeline

yaxunl created this revision.Aug 10 2018, 6:54 PM
tra accepted this revision.Aug 13 2018, 10:44 AM
This revision is now accepted and ready to land.Aug 13 2018, 10:44 AM
rjmccall accepted this revision.Aug 13 2018, 12:48 PM
This revision was automatically updated to reflect the committed changes.