This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.
ClosedPublic

Authored by jhuber6 on Jan 24 2023, 9:55 AM.

Details

Summary

The AMDGPU target can only emit LLVM-IR, so we can always rely on LTO to
link the static version of the runtime optimally. Using the static
library only has a few advantages. Namely, it avoids several known bugs
and allows us to optimize out more functions. This is legal since the
changes in D142486 and D142484

Depends on D142486 D142484

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 24 2023, 9:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 9:55 AM
jhuber6 requested review of this revision.Jan 24 2023, 9:55 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 24 2023, 9:55 AM
jdoerfert accepted this revision.Jan 24 2023, 9:58 AM

LG, not linking in something seems fine if it works and the direction is what we always wanted.

This revision is now accepted and ready to land.Jan 24 2023, 9:58 AM
arsenm added a subscriber: arsenm.Jan 24 2023, 2:20 PM

Well the library still doesn't 100% work unless using -mlink-builtin-bitcode. It's taking forever to make progress on fixing that

Well the library still doesn't 100% work unless using -mlink-builtin-bitcode. It's taking forever to make progress on fixing that

This is the OpenMP DeviceRTL, the AMD one is still shoved into each TU via -mlink-builtin-bitcode. I'm still interested in addressing that however, my ultimate desire is for linking on the device to be sane and match the host pretty closely.

This revision was landed with ongoing or failed builds.Jan 24 2023, 3:01 PM
This revision was automatically updated to reflect the committed changes.