aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-11-14 01:46:16 +0100
committerJakub Jelinek <jakub@redhat.com>2020-11-14 01:46:16 +0100
commita4dd85e01599890286d9af5b106a1ab20e51169e (patch)
tree3ea1bdeca840ecb5e7708bb78903693eeae47cf8 /gcc/gimple.c
parent77f67db2a4709388b905397421bd3a851fbbf884 (diff)
downloadgcc-a4dd85e01599890286d9af5b106a1ab20e51169e.zip
gcc-a4dd85e01599890286d9af5b106a1ab20e51169e.tar.gz
gcc-a4dd85e01599890286d9af5b106a1ab20e51169e.tar.bz2
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.
Diffstat (limited to 'gcc/gimple.c')
0 files changed, 0 insertions, 0 deletions