This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Adjust map type bits according to latest spec and use zero size array sections for pointers.
ClosedPublic

Authored by sfantao on May 10 2016, 9:18 AM.

Details

Summary

This patch changes the bits used to specify the map types according to the latest version of the libomptarget document and add the support for zero size array section when pointers are being implicitly mapped. This completes the missing new 4.5 map semantics.

Diff Detail

Event Timeline

sfantao updated this revision to Diff 56730.May 10 2016, 9:18 AM
sfantao retitled this revision from to [OpenMP] Adjust map type bits according to latest spec and use zero size array sections for pointers..
sfantao updated this object.
sfantao added subscribers: cfe-commits, caomhin.
sfantao updated this revision to Diff 57419.May 16 2016, 4:34 PM
  • Rebase.
ABataev added inline comments.May 18 2016, 5:42 AM
lib/CodeGen/CGOpenMPRuntime.cpp
4874–4878

I think multiple arguments for the same mapped/privatized decls must not be passed to runtime lib at all. Do we really need it?

sfantao updated this revision to Diff 58252.May 24 2016, 9:41 AM
  • Rebase after last changes related to first private.
ABataev added inline comments.May 24 2016, 8:00 PM
lib/CodeGen/CGOpenMPRuntime.cpp
4874–4878

The question is not answered yet.

sfantao added inline comments.May 25 2016, 8:09 AM
lib/CodeGen/CGOpenMPRuntime.cpp
4874–4878

Sorry Alexey, forgot to address this one.

Right now we support maps of patters like (you can find some of this patters in the tests for map clause) S.p1->p2->p3, or S.p[3][0:N] where S.p is an array of pointers. Each individual pointer requires its own map but have to be bound by the runtime to the same base declaration S so that on the device the code can properly dereference S to get to the pointers. This flag is used to signal that.

ABataev accepted this revision.May 25 2016, 7:56 PM
ABataev edited edge metadata.

LG

This revision is now accepted and ready to land.May 25 2016, 7:56 PM
sfantao closed this revision.May 26 2016, 9:54 AM