This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Expose the state in the header to allow non-lto optimizations
ClosedPublic

Authored by jdoerfert on Jul 19 2022, 12:25 PM.

Details

Summary

We used to inline the lookup calls such that the runtime had "known"
access offsets when it was shipped. With the new static library build it
doesn't as the lookup is an indirection we cannot look through. This
should help us optimize the code better until we can do LTO for the
runtime again.

Diff Detail

Event Timeline

jdoerfert created this revision.Jul 19 2022, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2022, 12:25 PM
jdoerfert requested review of this revision.Jul 19 2022, 12:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2022, 12:25 PM
Herald added a subscriber: sstefan1. · View Herald Transcript

LG assuming it works.

This is an unfortunate side-effect of moving to our new build system. With ordinary host LTO we get a single LLVM IR output, making it trivial to do some extra bitcode linking. The problem with the device LTO is that we need to wrap the device IR in a binary format so we know what it is, and then wrap that in a host object file. So to do extra linking we'd need to extract this and then put them back in. The two solutions that could work for this is to support relocatable linking via the linker wrapper, or do all the extraction and linking manually.

jhuber6 accepted this revision.Jul 19 2022, 12:38 PM
This revision is now accepted and ready to land.Jul 19 2022, 12:38 PM
This revision was landed with ongoing or failed builds.Jul 21 2022, 10:41 AM
This revision was automatically updated to reflect the committed changes.