r229805 - in /branches/gomp-4_5-branch: gcc/Cha...
jakub@gcc.gnu.org
jakub@gcc.gnu.org
Thu Nov 5 10:20:00 GMT 2015
Author: jakub
Date: Thu Nov 5 10:20:48 2015
New Revision: 229805
URL: https://gcc.gnu.org/viewcvs?rev=229805&root=gcc&view=rev
Log:
gcc/
* gimplify.c (omp_notice_variable): For references check
whether what it refers to has mappable type, rather than
the reference itself.
(gimplify_scan_omp_clauses): Add support for
GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER,
remove old handling of structure element based array sections.
(gimplify_adjust_omp_clauses_1): For implicit references to
variables with reference type and when not ref to scalar or
ref to pointer, map what they refer to using tofrom and
use GOMP_MAP_FIRSTPRIVATE_REFERENCE for the reference.
(gimplify_adjust_omp_clauses): Remove GOMP_MAP_ALWAYS_POINTER
from target exit data. Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE.
Drop OMP_CLAUSE_MAP_PRIVATE support.
* omp-low.c (scan_sharing_clauses): Handle
GOMP_MAP_FIRSTPRIVATE_REFERENCE, drop OMP_CLAUSE_MAP_PRIVATE
support.
(lower_omp_target): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE
and GOMP_MAP_ALWAYS_POINTER. Drop OMP_CLAUSE_MAP_PRIVATE
support.
* tree-pretty-print.c (dump_omp_clause): Handle
GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER.
Simplify.
* tree-vect-stmts.c (vectorizable_simd_clone_call): Add
SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_VARIABLE_STEP
cases.
gcc/c/
* c-parser.c (c_parser_omp_target_data,
c_parser_omp_target_enter_data,
c_parser_omp_target_exit_data, c_parser_omp_target): Allow
GOMP_MAP_ALWAYS_POINTER.
* c-typeck.c (handle_omp_array_sections): For structure element
based array sections use GOMP_MAP_ALWAYS_POINTER instead of
GOMP_MAP_FIRSTPRIVATE_POINTER.
(c_finish_omp_clauses): Drop generic_field_head, structure
elements are now always mapped even as array section bases,
diagnose same var in data sharing and mapping clauses.
gcc/cp/
* parser.c (cp_parser_omp_target_data,
cp_parser_omp_target_enter_data,
cp_parser_omp_target_exit_data, cp_parser_omp_target): Allow
GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
* semantics.c (handle_omp_array_sections): For structure element
based array sections use GOMP_MAP_ALWAYS_POINTER instead of
GOMP_MAP_FIRSTPRIVATE_POINTER.
(finish_omp_clauses): Drop generic_field_head, structure
elements are now always mapped even as array section bases,
diagnose same var in data sharing and mapping clauses.
For references map what they refer to using GOMP_MAP_ALWAYS_POINTER
for structure elements and GOMP_MAP_FIRSTPRIVATE_REFERENCE
otherwise.
gcc/testsuite/
* c-c++-common/gomp/clauses-2.c (foo): Adjust for diagnostics
of variables in both data sharing and mapping clauses and for
structure element based array sections being mapped rather than
privatized.
include/
* gomp-constants.h (enum gomp_map_kind): Add
GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
libgomp/
* target.c (gomp_map_0len_lookup, gomp_map_val): New inline
functions.
(gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER. For
GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup.
Use gomp_map_val function.
(gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use
gomp_map_0len_lookup instead of gomp_map_lookup.
(omp_target_is_present): Use gomp_map_0len_lookup instead of
gomp_map_lookup.
* testsuite/libgomp.c/target-12.c (main): Adjust for
omp_target_is_present change for one-past-last element.
* testsuite/libgomp.c/target-17.c (foo): Drop tests where
the same var is both mapped and privatized.
* testsuite/libgomp.c/target-19.c (foo): Adjust for different
handling of zero-length array sections.
* testsuite/libgomp.c/target-29.c: New test.
* testsuite/libgomp.c/target-30.c: New test.
* testsuite/libgomp.c++/target-14.C: New test.
* testsuite/libgomp.c++/target-15.C: New test.
* testsuite/libgomp.c++/target-16.C: New test.
* testsuite/libgomp.c++/target-17.C: New test.
* testsuite/libgomp.c++/target-18.C: New test.
* testsuite/libgomp.c++/target-19.C: New test.
Added:
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-14.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-15.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-16.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-17.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-18.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c++/target-19.C
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c/target-29.c
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c/target-30.c
Modified:
branches/gomp-4_5-branch/gcc/ChangeLog.gomp
branches/gomp-4_5-branch/gcc/c/ChangeLog.gomp
branches/gomp-4_5-branch/gcc/c/c-parser.c
branches/gomp-4_5-branch/gcc/c/c-typeck.c
branches/gomp-4_5-branch/gcc/cp/ChangeLog.gomp
branches/gomp-4_5-branch/gcc/cp/parser.c
branches/gomp-4_5-branch/gcc/cp/semantics.c
branches/gomp-4_5-branch/gcc/gimplify.c
branches/gomp-4_5-branch/gcc/omp-low.c
branches/gomp-4_5-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-4_5-branch/gcc/testsuite/c-c++-common/gomp/clauses-2.c
branches/gomp-4_5-branch/gcc/tree-pretty-print.c
branches/gomp-4_5-branch/gcc/tree-vect-stmts.c
branches/gomp-4_5-branch/gcc/tree.h
branches/gomp-4_5-branch/include/ChangeLog.gomp
branches/gomp-4_5-branch/include/gomp-constants.h
branches/gomp-4_5-branch/libgomp/ChangeLog.gomp
branches/gomp-4_5-branch/libgomp/target.c
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c/target-12.c
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c/target-17.c
branches/gomp-4_5-branch/libgomp/testsuite/libgomp.c/target-19.c
More information about the Gcc-cvs
mailing list