[Openmp-commits] [PATCH] D105121: [OpenMP] Avoid checking parent reference count in targetDataBegin
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 29 09:01:17 PDT 2021
protze.joachim added a comment.
I think, we need more tests challenging the reference counting for mapping rules to make sure that the code change is valid.
Also, is the expectation that the implementation respects the 5.2 clarifications/changes regarding reference counting of struct members (probably issue #1909)?
================
Comment at: openmp/libomptarget/src/omptarget.cpp:541-542
copy = true;
- } else if ((arg_types[i] & OMP_TGT_MAPTYPE_MEMBER_OF) &&
- !(arg_types[i] & OMP_TGT_MAPTYPE_PTR_AND_OBJ)) {
- // Copy data only if the "parent" struct has RefCount==1.
----------------
What is the meaning of these flags?
In code like the following, the `target` region should not copy any data, because S is already mapped in the `enter data`
```
struct{int a; int b;}s_s S;
#pragma omp target enter data map(to:S)
#pragma omp target map(tofrom:S.b)
{...}
#pragma omp target exit data map(from:S)
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105121/new/
https://reviews.llvm.org/D105121
More information about the Openmp-commits
mailing list