[Openmp-commits] [PATCH] D44186: [OpenMP][libomptarget] New map interface: remove translation code and ensure proper alignment of struct members

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 19 06:31:46 PDT 2018

grokos added inline comments.

Comment at: libomptarget/src/omptarget.cpp:202-204
+    if (member_of(arg_types[i]) < 0 && next_i < arg_num &&
+        member_of(arg_types[next_i]) == i) {
+      padding = (int64_t)HstPtrBegin % alignment;
Hahnfeld wrote:
> Again looking at this code, what if the `member_of` comes later and is not directly adjacent?
This is a concern, but at least for now clang produces the combined entry followed by the individual fields. I think this behavior should be enforced in the compiler. Otherwise, we would have to scan all other entries trying to find a `member_of`. This would be a process of quadratic complexity, which is what we wanted to eliminate via the new map interface.

  rOMP OpenMP


More information about the Openmp-commits mailing list