[HIP] Enable -amdgpu-internalize-symbols
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Tue, 16 Jun 2020 18:52:03 +0000 (14:52 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Thu, 18 Jun 2020 20:34:37 +0000 (16:34 -0400)
commitc830d517b4e46abb617a80b3967b26546370c928
treee7f57a394dae0500f3d6d0aa84a1f55b567fd03b
parentafd43a7a7878ea448079feab4ec922109c0eb6cf
[HIP] Enable -amdgpu-internalize-symbols

Enable -amdgpu-internalize-symbols to eliminate unused functions and global variables
for whole program to speed up compilation and improve performance.

For -fno-gpu-rdc, -amdgpu-internalize-symbols is passed to clang -cc1.

For -fgpu-rdc, -amdgpu-internalize-symbols is passed to lld.

Differential Revision: https://reviews.llvm.org/D81959
clang/lib/Driver/ToolChains/HIP.cpp
clang/test/Driver/hip-link-save-temps.hip
clang/test/Driver/hip-save-temps.hip
clang/test/Driver/hip-toolchain-no-rdc.hip
clang/test/Driver/hip-toolchain-rdc-separate.hip
clang/test/Driver/hip-toolchain-rdc.hip