[OpenMP] Avoid checking parent reference count in targetDataEnd
authorJoel E. Denny <jdenny.ornl@gmail.com>
Sat, 10 Jul 2021 16:01:34 +0000 (12:01 -0400)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Sat, 10 Jul 2021 16:15:04 +0000 (12:15 -0400)
commit1d0456361a4216855e8e7646dc28a372aff07efb
tree1936e59f20ad27aa4cb3a0151423ebe08a84220e
parent8f4e5474de74169c6c2f7dddbb84c93d3e3ccb07
[OpenMP] Avoid checking parent reference count in targetDataEnd

The patch has the following benefits:

* Eliminates a lock/unlock of the data mapping table.
* Clarifies the logic that determines whether a struct member's
  device-to-host transfer occurs.  The old logic, which checks the
  parent struct's reference count, is a leftover from back when we had
  a different map interface (as pointed out at
  <https://reviews.llvm.org/D104924#2846972>).

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D104924
openmp/libomptarget/src/omptarget.cpp