This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Make OpenMPOpt aware of the OpenMP runtime's status
ClosedPublic

Authored by jhuber6 on Jan 26 2023, 9:20 AM.

Details

Summary

The OpenMPOpt pass contains optimizations that generate new calls into
the OpenMP runtime. This causes problems if we are in a state where the
runtime has already been linked statically. Generating these new calls
will result in them never being resolved. We should indicate if we are
in a "post-link" LTO phase and prevent OpenMPOpt from generating new
runtime calls.

Generally, it's not desireable for passes to maintain state about the
context in which they're called. But this is the only reasonable
solution to static linking when we have a pass that generates new
runtime calls.

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 26 2023, 9:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 9:20 AM
jhuber6 requested review of this revision.Jan 26 2023, 9:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 9:20 AM
This revision is now accepted and ready to land.Jan 26 2023, 11:10 AM
This revision was landed with ongoing or failed builds.Jan 26 2023, 11:24 AM
This revision was automatically updated to reflect the committed changes.