[clang] [Clang][Driver] Enable internalization by default for AMDGPU (PR #138365)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Fri May 2 22:20:57 PDT 2025
================
@@ -9284,6 +9284,12 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(
"--device-linker=" + TC->getTripleString() + "=" + Arg));
+ // Enable internalization for AMDGPU.
+ if (TC->getTriple().isAMDGPU())
+ CmdArgs.push_back(
+ Args.MakeArgString("--device-linker=" + TC->getTripleString() +
+ "=-plugin-opt=-amdgpu-internalize-symbols"));
----------------
shiltian wrote:
Not really a hack TBH, though we are the only target explicitly using it. It significantly affects our performance. The remaining uses of this pass are in (Thin)LTO, which has broader impact.
https://github.com/llvm/llvm-project/pull/138365
More information about the cfe-commits
mailing list