This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][FIX] Do not crash when kernels are debug wrapper functions
ClosedPublic

Authored by jdoerfert on Mar 18 2022, 2:58 PM.

Details

Summary

With debug information enabled (-g) Clang will wrap the actual target
region into a new function which is called from the "kernel". The problem
is that the "kernel" is now basically a wrapper without all the things
we expect. More importantly, if we end up asking for an AAKernelInfo
for the "target region function" we might try to turn it into SPMD mode.
That used to cause an assertion as that function doesn't have an
appropriately named _exec_mode global. While the global is going away
soon we still need to make sure to properly handle this case, e.g.,
perform optimizations reliably.

Diff Detail

Event Timeline

jdoerfert created this revision.Mar 18 2022, 2:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 2:58 PM
jdoerfert requested review of this revision.Mar 18 2022, 2:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 2:58 PM
jdoerfert updated this revision to Diff 416614.Mar 18 2022, 2:59 PM

Remove leftover debug print

jdoerfert updated this revision to Diff 416615.Mar 18 2022, 3:04 PM

Fix broken test

jdoerfert updated this revision to Diff 416617.Mar 18 2022, 3:07 PM

Really fix test

This revision is now accepted and ready to land.Mar 18 2022, 5:54 PM
This revision was landed with ongoing or failed builds.Mar 19 2022, 12:16 PM
This revision was automatically updated to reflect the committed changes.