gcc/libgomp/testsuite
Chung-Lin Tang a7578a077e 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.
2024-04-16 09:04:11 +00:00
..
config Update copyright years. 2024-01-03 12:19:35 +01:00
lib libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] 2023-09-12 11:30:37 +02:00
libgomp.c nvptx: In mkoffload.cc, call diagnostic_color_init + gcc_init_libintl: Restore 'libgomp.c/reverse-offload-sm30.c' testing 2024-04-05 14:11:16 +02:00
libgomp.c++ c++: Fix ICE with weird copy assignment operator [PR114572] 2024-04-05 09:31:28 +02:00
libgomp.c-c++-common openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls 2024-03-22 18:09:40 +00:00
libgomp.fortran openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls 2024-03-22 18:09:40 +00:00
libgomp.graphite Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp.oacc-c
libgomp.oacc-c++ libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] 2023-09-12 11:30:37 +02:00
libgomp.oacc-c-c++-common OpenACC 2.7: Adjust acc_map_data/acc_unmap_data interaction with reference counters 2024-04-16 09:04:11 +00:00
libgomp.oacc-fortran Fix 'char' initialization, copy, check in 'libgomp.oacc-fortran/acc-memcpy.f90' 2024-03-14 15:41:33 +01:00
flock
libgomp-site-extra.exp.in libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] 2023-09-12 11:30:37 +02:00
libgomp-test-support.exp.in
Makefile.am
Makefile.in libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] 2023-09-12 11:30:37 +02:00