r244259 - in /branches/gomp-4_0-branch: gcc/Cha...
cltang@gcc.gnu.org
cltang@gcc.gnu.org
Tue Jan 10 07:48:00 GMT 2017
Author: cltang
Date: Tue Jan 10 07:48:33 2017
New Revision: 244259
URL: https://gcc.gnu.org/viewcvs?rev=244259&root=gcc&view=rev
Log:
2017-01-10 Chung-Lin Tang <cltang@codesourcery.com>
gcc/c/
* c-typeck.c (handle_omp_array_sections_1): Add 'bool &non_contiguous'
parameter, adjust recursive call site, add cases for allowing
pointer based multi-dimensional arrays for OpenACC.
(handle_omp_array_sections): Adjust handle_omp_array_sections_1 call,
handle non-contiguous case to create dynamic array map.
gcc/cp/
* semantics.c (handle_omp_array_sections_1): Add 'bool &non_contiguous'
parameter, adjust recursive call site, add cases for allowing
pointer based multi-dimensional arrays for OpenACC.
(handle_omp_array_sections): Adjust handle_omp_array_sections_1 call,
handle non-contiguous case to create dynamic array map.
gcc/
* gimplify.c (gimplify_scan_omp_clauses): For dynamic array map kinds,
make sure bias in each dimension are put into firstprivate variables.
* tree-pretty-print.c (dump_omp_clauses): Add cases for printing
GOMP_MAP_DYNAMIC_ARRAY map kinds.
* omp-low.c (struct omp_context):
Add 'hash_map<tree_operand_hash, tree> *dynamic_arrays' field, also
added include of "tree-hash-traits.h".
(append_field_to_record_type): New function.
(create_dynamic_array_descr_type): Likewise.
(create_dynamic_array_descr_init_code): Likewise.
(new_omp_context): Add initialize of dynamic_arrays field.
(delete_omp_context): Add delete of dynamic_arrays field.
(scan_sharing_clauses): For dynamic array map kinds, check for
supported dimension structure, and install dynamic array variable into
current omp_context.
(lower_omp_target): Add handling for dynamic array map kinds.
(dynamic_array_lookup): New function.
(dynamic_array_reference_start): Likewise.
(scan_for_op): Likewise.
(scan_for_reference): Likewise.
(da_create_bias): Likewise.
(da_dimension_peel): Likewise.
(lower_omp_1): Add case to look for start of dynamic array reference,
and handle bias adjustments for the code sequence.
include/
* gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_3): Define.
(enum gomp_map_kind): Add GOMP_MAP_DYNAMIC_ARRAY,
GOMP_MAP_DYNAMIC_ARRAY_TO, GOMP_MAP_DYNAMIC_ARRAY_FROM,
GOMP_MAP_DYNAMIC_ARRAY_TOFROM, GOMP_MAP_DYNAMIC_ARRAY_FORCE_TO,
GOMP_MAP_DYNAMIC_ARRAY_FORCE_FROM, GOMP_MAP_DYNAMIC_ARRAY_FORCE_TOFROM,
GOMP_MAP_DYNAMIC_ARRAY_ALLOC, GOMP_MAP_DYNAMIC_ARRAY_FORCE_ALLOC,
GOMP_MAP_DYNAMIC_ARRAY_FORCE_PRESENT.
(GOMP_MAP_DYNAMIC_ARRAY_P): Define.
libgomp/
* target.c (struct da_dim): New struct declaration.
(struct da_descr_type): Likewise.
(struct da_info): Likewise.
(gomp_dynamic_array_count_rows): New function.
(gomp_dynamic_array_compute_info): Likewise.
(gomp_dynamic_array_fill_rows_1): Likewise.
(gomp_dynamic_array_fill_rows): Likewise.
(gomp_dynamic_array_create_ptrblock): Likewise.
(gomp_map_vars): Add code to handle dynamic array map kinds.
* testsuite/libgomp.oacc-c-c++-common/da-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/da-2.c: New test.
* testsuite/libgomp.oacc-c-c++-common/da-3.c: New test.
* testsuite/libgomp.oacc-c-c++-common/da-4.c: New test.
* testsuite/libgomp.oacc-c-c++-common/da-utils.h: New test.
Added:
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c-c++-common/da-1.c
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c-c++-common/da-2.c
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c-c++-common/da-3.c
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c-c++-common/da-4.c
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c-c++-common/da-utils.h
Modified:
branches/gomp-4_0-branch/gcc/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/c/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/c/c-typeck.c
branches/gomp-4_0-branch/gcc/cp/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/cp/semantics.c
branches/gomp-4_0-branch/gcc/gimplify.c
branches/gomp-4_0-branch/gcc/omp-low.c
branches/gomp-4_0-branch/gcc/tree-pretty-print.c
branches/gomp-4_0-branch/include/ChangeLog.gomp
branches/gomp-4_0-branch/include/gomp-constants.h
branches/gomp-4_0-branch/libgomp/ChangeLog.gomp
branches/gomp-4_0-branch/libgomp/target.c
More information about the Gcc-cvs
mailing list