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

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 08:09:30 PDT 2016


sfantao added inline comments.

================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:4874-4878
@@ -4881,1 +4873,7 @@
+    OMP_MAP_IS_PTR = 0x10,
+    /// \brief This flags signals that an argument is the first one relating to
+    /// a map/private clause expression. For some cases a single
+    /// map/privatization results in multiple arguments passed to the runtime
+    /// library.
+    OMP_MAP_FIRST_REF = 0x20,
     /// \brief Pass the element to the device by value.
----------------
ABataev wrote:
> The question is not answered yet.
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.



http://reviews.llvm.org/D20111





More information about the cfe-commits mailing list