This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][FIX] Do not add custom state machine eagerly in LTO runs
ClosedPublic

Authored by jdoerfert on Oct 25 2022, 11:08 PM.

Details

Summary

If we run LTO optimization we migth end up introducing a custom state machine
and later transforming the region into SPMD. This is a problem. While a follow
up will introduce a check for the SPMD conversion, this already prevents the
eager custom state machine generation. Only if the kernel init function is
defined, rather then declared, we will emit a custom state machine. SPMD-zation
can happen eagerly though. Tests are adjusted via a weak definition. The LTO
test was added to verify this works as expected.

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 25 2022, 11:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 11:08 PM
jdoerfert requested review of this revision.Oct 25 2022, 11:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 11:08 PM
This revision is now accepted and ready to land.Oct 26 2022, 5:29 AM
This revision was landed with ongoing or failed builds.Oct 26 2022, 10:43 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Oct 26 2022, 11:24 AM

Looks like this broke check-clang: http://45.33.8.238/linux/89942/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Looks like this broke check-clang: http://45.33.8.238/linux/89942/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Fixed, sorry for the delay.