]> git.ipfire.org Git - thirdparty/gcc.git/commit
Various OpenACC reduction enhancements - FE changes
authorJulian Brown <julian@codesourcery.com>
Tue, 12 Feb 2019 22:56:12 +0000 (14:56 -0800)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:08 +0000 (14:11 +0100)
commit3a5e525489f2f808093ae1f12b5d2b406f571ec7
treeaefe72d28400084d1e33f6287f15051c17409d72
parent4c708e0500a9cc3130d9bd87695b18fc4674a113
Various OpenACC reduction enhancements - FE changes

This version differs somewhat from the last version posted upstream
(and addresses some of Jakub's review comments).

2018-12-13  Cesar Philippidis  <cesar@codesourcery.com>
    Nathan Sidwell  <nathan@acm.org>
    Julian Brown  <julian@codesourcery.com>

gcc/c/
* c-parser.cc (c_parser_omp_variable_list): New c_omp_region_type
argument.  Use it to specialize handling of OMP_CLAUSE_REDUCTION for
OpenACC.
(c_parser_oacc_data_clause): Add region-type argument.
(c_parser_oacc_data_clause_deviceptr): Likewise.
(c_parser_omp_clause_reduction): Change is_omp boolean parameter to
c_omp_region_type.  Update call to c_parser_omp_variable_list.
(c_parser_oacc_all_clauses): Update calls to
c_parser_omp_clause_reduction.
(c_parser_omp_all_clauses): Likewise.
(c_parser_oacc_cache): Update call to c_parser_omp_var_list_parens.
* c-typeck.cc (c_finish_omp_clauses): Emit an error on orphan OpenACC
gang reductions.  Suppress user-defined reduction error for OpenACC.

gcc/cp/
* parser.cc (cp_parser_omp_var_list_no_open):  New c_omp_region_type
argument.  Use it to specialize handling of OMP_CLAUSE_REDUCTION for
OpenACC.
(cp_parser_omp_var_list): Add c_omp_region_type argument. Update call
to cp_parser_omp_var_list_parens.
(cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list.
(cp_parser_omp_clause_reduction): Change is_omp boolean parameter to
c_omp_region_type.  Update call to cp_parser_omp_var_list_no_open.
(cp_parser_oacc_all_clauses): Update call to
cp_parser_omp_clause_reduction.
(cp_parser_omp_all_clauses): Likewise.
* semantics.cc (finish_omp_reduction_clause): Add c_omp_region_type
argument.  Suppress user-defined reduction error for OpenACC.
(finish_omp_clauses): Emit an error on orphan OpenACC gang reductions.

gcc/fortran/
* openmp.cc (oacc_is_parallel): New.
(resolve_oacc_loop_blocks): Emit an error on orphan OpenACC
gang reductions.
* trans-openmp.cc (gfc_omp_clause_copy_ctor): Permit reductions.

2022-02-03  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/c/
* c-parser.cc (c_parser_omp_clause_map): Update call to
c_parser_omp_variable_list.
(c_parser_omp_clause_to): Update call to c_parser_omp_var_list_parens.
(c_parser_omp_clause_from): Likewise.

gcc/cp/
* parser.cc (cp_parser_omp_clause_map): Update call to
cp_parser_omp_var_list_no_open.
(cp_parser_omp_all_clauses): Update calls to cp_parser_omp_var_list.
gcc/c/ChangeLog.omp
gcc/c/c-parser.cc
gcc/c/c-typeck.cc
gcc/cp/ChangeLog.omp
gcc/cp/parser.cc
gcc/cp/semantics.cc
gcc/fortran/ChangeLog.omp
gcc/fortran/openmp.cc
gcc/fortran/trans-openmp.cc