This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Change OpenMP code generation for target region entries
ClosedPublic

Authored by jhuber6 on Jun 24 2022, 12:04 PM.

Details

Summary

This patch changes the code we generate to enter a target region on the
device. This is in-line with the new definition in the runtime that was
added previously. Additionally we implement this in the OpenMPIRBuilder
so that this code can be shared with Flang in the future.

Diff Detail

Event Timeline

jhuber6 created this revision.Jun 24 2022, 12:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 12:04 PM
jhuber6 requested review of this revision.Jun 24 2022, 12:04 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 24 2022, 12:04 PM

This currently fails about 180 Clang tests. Of those about half can be automatically updated. I tried to manually update the other 90 but gave up, attempting to auto generate those tests as well would most likely result in over half a million new lined added to LLVM, the autogenerated tests are highly inefficient and will blow up a 100 line test into 40,000 lines of checks.

ABataev added inline comments.Jun 24 2022, 12:07 PM
clang/lib/CodeGen/CGOpenMPRuntime.cpp
6719–6720

This code can be removed safely in this form

jhuber6 updated this revision to Diff 439851.Jun 24 2022, 12:13 PM

Simplify interface now that we use -1 to indicate a lack of teams.

jhuber6 updated this revision to Diff 439853.Jun 24 2022, 12:16 PM

Update comment.

jhuber6 updated this revision to Diff 440822.Jun 28 2022, 6:50 PM

Fix tests, lots of lines.

jhuber6 updated this revision to Diff 441048.Jun 29 2022, 9:27 AM

Update with new version.

This revision is now accepted and ready to land.Jun 30 2022, 4:07 AM
jhuber6 updated this revision to Diff 443011.Jul 7 2022, 11:50 AM

Moving version field to struct

This revision was landed with ongoing or failed builds.Jul 8 2022, 11:45 AM
This revision was automatically updated to reflect the committed changes.