This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Fix visibility of `__constant__` variables.
ClosedPublic

Authored by hliao on Apr 26 2019, 8:27 AM.

Details

Event Timeline

hliao created this revision.Apr 26 2019, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2019, 8:27 AM
yaxunl added inline comments.Apr 26 2019, 11:37 AM
clang/lib/CodeGen/TargetInfo.cpp
7851

is format right?

clang/test/CodeGenCUDA/amdgpu-visibility.cu
1

do we need -fapply-global-visibility-to-externs?

hliao marked an inline comment as done.Apr 26 2019, 11:40 AM
hliao added inline comments.
clang/lib/CodeGen/TargetInfo.cpp
7851

yeah, it's the format after clang-format. It seems that clang-format try to apply the same indent for LHS & RHS of a binary operator. With the leading parenthesis, RHS in a newline is indented with one more space.

hliao marked an inline comment as done.Apr 26 2019, 11:44 AM
hliao added inline comments.
clang/test/CodeGenCUDA/amdgpu-visibility.cu
1

that's so far the option applied for both AMDGPU & HIP (targetting non-MS) by default in clang frontend. Check AMDGPUToolChain::addClangTargetOptions and HIPToolChain::addClangTargetOptions

yaxunl accepted this revision.Apr 26 2019, 12:25 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Apr 26 2019, 12:25 PM
This revision was automatically updated to reflect the committed changes.