gcc/libgomp
Tobias Burnus 89d0f082b3 OpenMP/Fortran: Parsing support for 'uses_allocators'
The 'uses_allocators' clause to the 'target' construct accepts predefined
allocators and can also be used to define a new allocator for a target region.
As predefined allocators in GCC do not require special handling, those can and
are ignored after parsing, such that this feature now works. On the other hand,
defining a new allocator will fail for now with a 'sorry, unimplemented'.

Note that both the OpenMP 5.0/5.1 and 5.2 syntax for uses_allocators
is supported by this commit.

2023-07-17  Tobias Burnus  <tobias@codesoucery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

gcc/fortran/ChangeLog:

	* dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Dump
	uses_allocators clause.
	* gfortran.h (gfc_free_omp_namelist): Add memspace_sym to u union
	and traits_sym to u2 union.
	(OMP_LIST_USES_ALLOCATORS): New enum value.
	(gfc_free_omp_namelist): Add 'bool free_mem_traits_space' arg.
	* match.cc (gfc_free_omp_namelist): Likewise.
	* openmp.cc (gfc_free_omp_clauses, gfc_match_omp_variable_list,
	gfc_match_omp_to_link, gfc_match_omp_doacross_sink,
	gfc_match_omp_clause_reduction, gfc_match_omp_allocate,
	gfc_match_omp_flush): Update call.
	(gfc_match_omp_clauses): Likewise. Parse uses_allocators clause.
	(gfc_match_omp_clause_uses_allocators): New.
	(enum omp_mask2): Add new OMP_CLAUSE_USES_ALLOCATORS.
	(OMP_TARGET_CLAUSES): Accept it.
	(resolve_omp_clauses): Resolve uses_allocators clause
	* st.cc (gfc_free_statement): Update gfc_free_omp_namelist call.
	* trans-openmp.cc (gfc_trans_omp_clauses): Handle
	OMP_LIST_USES_ALLOCATORS; fail with sorry unless predefined allocator.
	(gfc_split_omp_clauses): Handle uses_allocators.

libgomp/ChangeLog:

	* testsuite/libgomp.fortran/uses_allocators_1.f90: New test.
	* testsuite/libgomp.fortran/uses_allocators_2.f90: New test.

Co-authored-by: Chung-Lin Tang <cltang@codesourcery.com>
2023-07-17 15:13:44 +02:00
..
config libgomp: Use libnuma for OpenMP's partition=nearest allocation trait 2023-07-12 13:50:21 +02:00
plugin libgomp: plugin-gcn - support 'unified_address' 2023-06-06 18:06:14 +02:00
testsuite OpenMP/Fortran: Parsing support for 'uses_allocators' 2023-07-17 15:13:44 +02:00
.gitattributes libgomp: Fixes + cleanup for OpenACC's Fortran module + openacc_lib.h 2020-02-19 09:13:44 +01:00
acc_prof.h Update copyright years. 2023-01-16 11:52:17 +01:00
acinclude.m4 libgomp: fix typo in mold linker detection 2022-06-28 10:35:32 +02:00
aclocal.m4 libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
affinity-fmt.c Update copyright years. 2023-01-16 11:52:17 +01:00
affinity.c Update copyright years. 2023-01-16 11:52:17 +01:00
alloc.c Update copyright years. 2023-01-16 11:52:17 +01:00
allocator.c libgomp: Fix allocator handling for Linux when libnuma is not available 2023-07-14 09:19:57 +02:00
atomic.c Update copyright years. 2023-01-16 11:52:17 +01:00
barrier.c Update copyright years. 2023-01-16 11:52:17 +01:00
ChangeLog Daily bump. 2023-07-15 00:17:26 +00:00
ChangeLog.graphite
config.h.in Refactor '-ldl' handling for libgomp proper and plugins 2022-05-12 15:11:30 +02:00
configure Support parallel testing in libgomp: fallback Perl 'flock' [PR66005] 2023-06-02 09:51:15 +02:00
configure.ac Support parallel testing in libgomp: fallback Perl 'flock' [PR66005] 2023-06-02 09:51:15 +02:00
configure.tgt LoongArch Port: libgomp 2022-03-29 17:43:35 +08:00
critical.c Update copyright years. 2023-01-16 11:52:17 +01:00
env.c libgomp: Extend OMP_ALLOCATOR, add affinity env var doc 2023-06-15 12:55:58 +02:00
error.c Update copyright years. 2023-01-16 11:52:17 +01:00
fortran.c Update copyright years. 2023-01-16 11:52:17 +01:00
hashtab.h Update copyright years. 2023-01-16 11:52:17 +01:00
icv-device.c OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory 2023-06-14 07:53:02 +02:00
icv.c Update copyright years. 2023-01-16 11:52:17 +01:00
iter.c Update copyright years. 2023-01-16 11:52:17 +01:00
iter_ull.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgomp-plugin.c libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation 2023-05-08 15:58:05 +02:00
libgomp-plugin.h libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation 2023-05-08 15:58:05 +02:00
libgomp.h libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation 2023-05-08 15:58:05 +02:00
libgomp.map libgomp/nvptx: Prepare for reverse-offload callback handling 2022-10-24 17:04:08 +02:00
libgomp.spec.in
libgomp.texi libgomp.texi: Extend memory allocation documentation 2023-07-14 13:15:07 +02:00
libgomp_f.h.in Update copyright years. 2023-01-16 11:52:17 +01:00
libgomp_g.h Update copyright years. 2023-01-16 11:52:17 +01:00
lock.c Update copyright years. 2023-01-16 11:52:17 +01:00
loop.c Update copyright years. 2023-01-16 11:52:17 +01:00
loop_ull.c Update copyright years. 2023-01-16 11:52:17 +01:00
Makefile.am Refactor '-ldl' handling for libgomp proper and plugins 2022-05-12 15:11:30 +02:00
Makefile.in Remove stale Autoconf checks for Perl 2023-06-02 09:51:14 +02:00
oacc-async.c OpenACC: Remove 'acc_async_test' -> skip shortcut in 'libgomp/oacc-async.c:goacc_wait' 2023-03-10 15:37:47 +01:00
oacc-cuda.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-host.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-init.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-int.h Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-mem.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-parallel.c Use 'GOMP_MAP_VARS_TARGET' for OpenACC compute constructs [PR90596] 2023-03-10 18:05:27 +01:00
oacc-plugin.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-plugin.h Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-profiling.c Update copyright years. 2023-01-16 11:52:17 +01:00
oacc-target.c GCN libgomp port 2019-11-13 12:38:04 +00:00
omp.h.in Update copyright years. 2023-01-16 11:52:17 +01:00
omp_lib.f90.in Update copyright years. 2023-01-16 11:52:17 +01:00
omp_lib.h.in Update copyright years. 2023-01-16 11:52:17 +01:00
openacc.f90 Update copyright years. 2023-01-16 11:52:17 +01:00
openacc.h Update copyright years. 2023-01-16 11:52:17 +01:00
openacc_lib.h Update copyright years. 2023-01-16 11:52:17 +01:00
ordered.c Update copyright years. 2023-01-16 11:52:17 +01:00
parallel.c Update copyright years. 2023-01-16 11:52:17 +01:00
priority_queue.c Update copyright years. 2023-01-16 11:52:17 +01:00
priority_queue.h Update copyright years. 2023-01-16 11:52:17 +01:00
scope.c Update copyright years. 2023-01-16 11:52:17 +01:00
sections.c Update copyright years. 2023-01-16 11:52:17 +01:00
secure_getenv.h Update copyright years. 2023-01-16 11:52:17 +01:00
single.c Update copyright years. 2023-01-16 11:52:17 +01:00
splay-tree.c Update copyright years. 2023-01-16 11:52:17 +01:00
splay-tree.h Update copyright years. 2023-01-16 11:52:17 +01:00
target.c OpenMP (C/C++): Keep pointer value of unmapped ptr with default mapping [PR110270] 2023-06-19 09:08:51 +02:00
task.c Update copyright years. 2023-01-16 11:52:17 +01:00
taskloop.c Update copyright years. 2023-01-16 11:52:17 +01:00
team.c Update copyright years. 2023-01-16 11:52:17 +01:00
teams.c Update copyright years. 2023-01-16 11:52:17 +01:00
work.c Update copyright years. 2023-01-16 11:52:17 +01:00