-
- Downloads
c-pragma.c (oacc_pragmas): Add entry for declare directive.
2015-11-12 James Norris <jnorris@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
gcc/c-family/
* c-pragma.c (oacc_pragmas): Add entry for declare directive.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
PRAGMA_OACC_CLAUSE_LINK.
gcc/c/
* c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
(c_parser_omp_clause_name): Handle 'device_resident' clause.
(c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OMP_CLAUSE_LINK.
(c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OACC_CLAUSE_LINK.
(OACC_DECLARE_CLAUSE_MASK): New definition.
(c_parser_oacc_declare): New function.
gcc/cp/
* parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
clause.
(cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OMP_CLAUSE_LINK.
(cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OMP_CLAUSE_LINK.
(OACC_DECLARE_CLAUSE_MASK): New definition.
(cp_parser_oacc_declare): New function.
(cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
* pt.c (tsubst_expr): Handle OACC_DECLARE.
gcc/
* gimple-pretty-print.c (dump_gimple_omp_target): Handle
GF_OMP_TARGET_KIND_OACC_DECLARE.
* gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DECLARE.
(is_gomple_omp_oacc): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
* gimplify.c (oacc_declare_returns): New.
(gimplify_bind_expr): Prepend 'exit' stmt to cleanup.
(device_resident_p): New function.
(oacc_default_clause): Handle device_resident clause.
(gimplify_oacc_declare_1, gimplify_oacc_declare): New functions.
(gimplify_expr): Handle OACC_DECLARE.
* omp-builtins.def (BUILT_IN_GOACC_DECLARE): New builtin.
* omp-low.c (expand_omp_target): Handle
GF_OMP_TARGET_KIND_OACC_DECLARE and BUILTIN_GOACC_DECLARE.
(build_omp_regions_1): Handlde GF_OMP_TARGET_KIND_OACC_DECLARE.
(lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE,
GOMP_MAP_DEVICE_RESIDENT and GOMP_MAP_LINK.
(make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
* tree-pretty-print.c (dump_omp_clause): Handle GOMP_MAP_LINK and
GOMP_MAP_DEVICE_RESIDENT.
gcc/testsuite
* c-c++-common/goacc/declare-1.c: New test.
* c-c++-common/goacc/declare-2.c: Likewise.
include/
* gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT
and GOMP_MAP_LINK.
libgomp/
* libgomp.map (GOACC_2.0.1): Export GOACC_declare.
* oacc-parallel.c (GOACC_declare): New function.
* testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
* testsuite/libgomp.oacc-c++/declare-1.C: Likewise.
Co-Authored-By:
Joseph Myers <joseph@codesourcery.com>
From-SVN: r230275
Showing
- gcc/ChangeLog 23 additions, 0 deletionsgcc/ChangeLog
- gcc/c-family/ChangeLog 8 additions, 0 deletionsgcc/c-family/ChangeLog
- gcc/c-family/c-pragma.c 1 addition, 0 deletionsgcc/c-family/c-pragma.c
- gcc/c-family/c-pragma.h 4 additions, 1 deletiongcc/c-family/c-pragma.h
- gcc/c/ChangeLog 12 additions, 0 deletionsgcc/c/ChangeLog
- gcc/c/c-parser.c 176 additions, 0 deletionsgcc/c/c-parser.c
- gcc/cp/ChangeLog 14 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/parser.c 172 additions, 0 deletionsgcc/cp/parser.c
- gcc/cp/pt.c 8 additions, 0 deletionsgcc/cp/pt.c
- gcc/gimple-pretty-print.c 3 additions, 0 deletionsgcc/gimple-pretty-print.c
- gcc/gimple.h 2 additions, 0 deletionsgcc/gimple.h
- gcc/gimplify.c 182 additions, 2 deletionsgcc/gimplify.c
- gcc/omp-builtins.def 2 additions, 0 deletionsgcc/omp-builtins.def
- gcc/omp-low.c 10 additions, 0 deletionsgcc/omp-low.c
- gcc/testsuite/ChangeLog 6 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/goacc/declare-1.c 83 additions, 0 deletionsgcc/testsuite/c-c++-common/goacc/declare-1.c
- gcc/testsuite/c-c++-common/goacc/declare-2.c 79 additions, 0 deletionsgcc/testsuite/c-c++-common/goacc/declare-2.c
- gcc/tree-pretty-print.c 6 additions, 0 deletionsgcc/tree-pretty-print.c
- include/ChangeLog 6 additions, 0 deletionsinclude/ChangeLog
- include/gomp-constants.h 5 additions, 0 deletionsinclude/gomp-constants.h
Loading
Please register or sign in to comment