gcc/libgomp/testsuite/libgomp.c-c++-common
Jakub Jelinek a4dd85e015 openmp: Add support for non-VLA {,first}private allocate on omp task
This patch adds support for custom allocators on private/firstprivate
clauses for task (and taskloop) constructs.  Private didn't need anything
special, but firstprivate if it is passed by reference needs the GOMP_alloc
calls in the copyfn and GOMP_free in the task body.

2020-11-14  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (gimplify_omp_for): Add OMP_CLAUSE_ALLOCATE_ALLOCATOR
	decls as firstprivate on task clauses even when allocate clause
	decl is not lastprivate.
	* omp-low.c (install_var_field): Don't dereference omp_is_reference
	types if mask is 33 rather than 1.
	(scan_sharing_clauses): Populate allocate_map even for task
	constructs.  For now remove it back for variables mentioned in
	reduction and in_reduction clauses on task/taskloop constructs
	or on VLA task firstprivates.  For firstprivate on task construct,
	install the var field into field_map with by_ref and 33 instead
	of false and 1 if mentioned in allocate clause.
	(lower_private_allocate): Set TREE_THIS_NOTRAP on the created
	MEM_REF.
	(lower_rec_input_clauses): Handle allocate for task firstprivatized
	non-VLA variables.
	(create_task_copyfn): Likewise.

	* testsuite/libgomp.c-c++-common/allocate-1.c (struct S): New type.
	(foo): Add tests for non-VLA private and firstprivate clauses on
	omp task.
	(bar): Likewise.  Remove taking of address from private/firstprivate
	variables.
	* testsuite/libgomp.c++/allocate-1.C (struct S): New type.
	(foo): Add p, q, px and s arguments.  Add tests for array reductions
	and for non-VLA private and firstprivate clauses on omp task.
	(bar): Removed.
	(main): Adjust foo caller.  Don't call bar.
2020-11-14 01:46:16 +01:00
..
alloc-1.c openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
alloc-2.c libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
alloc-3.c openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
alloc-4.c openmp: omp_alloc(0, ...) should return NULL. 2020-05-30 14:02:56 +02:00
allocate-1.c openmp: Add support for non-VLA {,first}private allocate on omp task 2020-11-14 01:46:16 +01:00
atomic-18.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
cancel-parallel-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
cancel-taskgroup-1.c
cancel-taskgroup-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
cancel-taskgroup-3.c re PR libgomp/87995 (libgomp.c/../libgomp.c-c++-common/cancel-taskgroup-3.c fails consistently after r265930) 2018-12-08 09:58:24 +01:00
cancel-taskgroup-4.c omp-low.c (check_omp_nesting_restrictions): Allow cancel or cancellation point with taskgroup clause inside of taskloop. 2018-12-02 13:48:42 +01:00
critical-hint-1.c critical-hint-*.{c,f90}: Move from gcc/testsuite to libgomp/testsuite 2020-07-22 12:14:22 +02:00
critical-hint-2.c critical-hint-*.{c,f90}: Move from gcc/testsuite to libgomp/testsuite 2020-07-22 12:14:22 +02:00
depend-iterator-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depend-iterator-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depend-mutexinout-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depend-mutexinout-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
depobj-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
display-affinity-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-1.h [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-2.h openmp: Handle reduction clauses on host teams construct [PR96459] 2020-08-05 10:40:10 +02:00
for-3.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-4.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-5.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-6.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
for-7.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-8.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-9.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-10.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-11.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-12.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-13.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-14.c openmp: Handle reduction clauses on host teams construct [PR96459] 2020-08-05 10:40:10 +02:00
for-15.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
for-16.c omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START, [...]): Fix up function types - remove one argument. 2018-12-12 23:47:55 +01:00
function-not-offloaded-aux.c [offloading] Error on missing symbols 2018-12-14 13:48:56 +00:00
function-not-offloaded.c [gcn] Set 'UI_NONE' for 'TARGET_EXCEPT_UNWIND_INFO' [PR94282] 2020-04-29 09:39:03 +02:00
lastprivate-conditional-1.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_. 2019-05-24 23:31:59 +02:00
lastprivate-conditional-2.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_. 2019-05-24 23:31:59 +02:00
lastprivate-conditional-3.c omp-low.c (lower_omp_1): Look through ordered... 2019-05-27 23:31:40 +02:00
lastprivate-conditional-4.c gimplify.c (struct gimplify_omp_ctx): Add clauses member. 2019-05-29 09:51:43 +02:00
lastprivate-conditional-5.c gimplify.c (struct gimplify_omp_ctx): Add clauses member. 2019-05-29 09:51:43 +02:00
lastprivate-conditional-6.c gimplify.c (struct gimplify_omp_ctx): Add clauses member. 2019-05-29 09:51:43 +02:00
lastprivate-conditional-7.c gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate conditional on combined for simd. 2019-06-04 14:49:03 +02:00
lastprivate-conditional-8.c gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate conditional on combined for simd. 2019-06-04 14:49:03 +02:00
lastprivate-conditional-9.c gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate conditional on combined for simd. 2019-06-04 14:49:03 +02:00
lastprivate-conditional-10.c gimplify.c (gimplify_scan_omp_clauses): Don't sorry_at on lastprivate conditional on combined for simd. 2019-06-04 14:49:03 +02:00
loop-1.c tree.def (OMP_LOOP): New tree code. 2019-07-20 13:21:42 +02:00
loop-13.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
loop-14.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
loop-15.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
master-combined-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
monotonic-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
monotonic-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
nested-parallel-unbalanced.c libgomp: disable barriers in nested teams 2020-09-29 11:48:04 +01:00
nonmonotonic-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
nonmonotonic-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
ordered-4.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pause-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pause-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr45784.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr64824.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr64868.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-3.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-4.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-5.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-6.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-7.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-8.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-9.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr66199-10.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr66199-11.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr66199-12.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr66199-13.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr66199-14.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
pr69389.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
pr81875.c
pr83046.c Prune removed funcs from offload table 2017-12-30 17:02:00 +00:00
pr93515.c openmp: Fix handling of non-addressable shared scalars in parallel nested inside of target [PR93515] 2020-02-06 09:19:08 +01:00
pr96390.c OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390) 2020-09-28 18:08:05 +02:00
ptr-attach-1.c openmp: Implement OpenMP 5.0 base-pointer attachement and clause ordering 2020-11-10 03:36:58 -08:00
reduction-16.c [libgomp, nvptx] Add __sync_compare_and_swap_16 2020-09-14 08:28:56 +02:00
simd-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
simd-14.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
simd-15.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
simd-16.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
simd-17.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
target-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
target-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
target-10.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
target-13.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
target-40.c openmp: Also implicitly mark as declare target to functions mentioned in target regions 2020-05-14 09:48:32 +02:00
task-reduction-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-3.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-4.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-5.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-6.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-7.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-8.c task-reduction-8.c (bar): Add in_reduction clause for s[0]. 2018-11-08 20:38:21 +01:00
task-reduction-9.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-11.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-12.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-13.c workshare-reduction-1.c: New test. 2018-11-09 14:02:50 +01:00
task-reduction-14.c workshare-reduction-1.c: New test. 2018-11-09 14:02:50 +01:00
taskgroup-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
taskloop-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
taskloop-2.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
taskloop-3.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
taskloop-4.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
taskloop-reduction-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-3.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskloop-reduction-4.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
taskwait-depend-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
udr-1.c [libgomp, testsuite] Move tests to libgomp.c-c++-common 2018-05-02 17:53:43 +00:00
unmap-infinity-2.c OpenACC reference count overhaul 2019-12-20 01:20:16 +00:00
variable-not-offloaded.c [offloading] Error on missing symbols 2018-12-14 13:48:56 +00:00