[clang] [Clang][Driver] Enable internalization by default for AMDGPU (PR #138365)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Sat May 3 09:31:48 PDT 2025


jhuber6 wrote:

> I don't think OpenMP is more special than HIP here. Anything exposed to the host should not be internalized. In addition, OpenMP actually also heavily uses internalization as well in OpenMPOpt. It is likely that this change exposes something bad in the downstream.
> 
> The motivation of this change was to apply ThinLTO for OpenMP. Given our current approach to link device runtime, it will be treated as a regular input file and then goes through the backend as well, which is completely unnecessary. Its whole purpose should be for function import. After that, it should be discarded.

Not fully understanding this, right now the OpenMP library is linked as a normal static library `-lompdevice`. What requires special treatment here? I go out of my way to remove needing these AMD specific hacks so I'm wondering what necessitates putting it back in.

https://github.com/llvm/llvm-project/pull/138365


More information about the cfe-commits mailing list