aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@baylibre.com>2024-04-16 09:03:21 +0000
committerChung-Lin Tang <cltang@baylibre.com>2024-04-16 09:04:11 +0000
commita7578a077ed8b64b94282aa55faf7037690abbc5 (patch)
tree1ec72d713dc1e66fa238d3b15396b21b30d75144 /libgcc
parent274f6bbe2328f899fd4e24636e0d71ac08c99856 (diff)
downloadgcc-a7578a077ed8b64b94282aa55faf7037690abbc5.zip
gcc-a7578a077ed8b64b94282aa55faf7037690abbc5.tar.gz
gcc-a7578a077ed8b64b94282aa55faf7037690abbc5.tar.bz2
OpenACC 2.7: Adjust acc_map_data/acc_unmap_data interaction with reference counters
This patch adjusts the implementation of acc_map_data/acc_unmap_data API library routines to more fit the description in the OpenACC 2.7 specification. Instead of using REFCOUNT_INFINITY, we now define a REFCOUNT_ACC_MAP_DATA special value to mark acc_map_data-created mappings. Adjustment around mapping related code to respect OpenACC semantics are also added. libgomp/ChangeLog: * libgomp.h (REFCOUNT_ACC_MAP_DATA): Define as (REFCOUNT_SPECIAL | 2). * oacc-mem.c (acc_map_data): Adjust to use REFCOUNT_ACC_MAP_DATA, initialize dynamic_refcount as 1. (acc_unmap_data): Adjust to use REFCOUNT_ACC_MAP_DATA, (goacc_map_var_existing): Add REFCOUNT_ACC_MAP_DATA case. (goacc_exit_datum_1): Add REFCOUNT_ACC_MAP_DATA case, respect REFCOUNT_ACC_MAP_DATA when decrementing/finalizing. Force lowest dynamic_refcount to be 1 for REFCOUNT_ACC_MAP_DATA. (goacc_enter_data_internal): Add REFCOUNT_ACC_MAP_DATA case. * target.c (gomp_increment_refcount): Return early for REFCOUNT_ACC_MAP_DATA case. (gomp_decrement_refcount): Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-96.c: New testcase. * testsuite/libgomp.oacc-c-c++-common/unmap-infinity-1.c: Adjust testcase error output scan test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions