aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.cc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-10-20 14:47:58 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-10-25 11:02:27 +0200
commitc92509d9fd98e02d17ab1610f696c88f606dcdf4 (patch)
treebf09f4a59da22fd7f265c21fa59f410deddcf085 /gcc/tree-pretty-print.cc
parent76cc5463227308c4dd2b70ccfe04d2b5361db0fe (diff)
downloadgcc-c92509d9fd98e02d17ab1610f696c88f606dcdf4.zip
gcc-c92509d9fd98e02d17ab1610f696c88f606dcdf4.tar.gz
gcc-c92509d9fd98e02d17ab1610f696c88f606dcdf4.tar.bz2
Disentangle handling of OpenACC 'host', 'self' pragma tokens
'gcc/c-family/c-pragma.h:pragma_omp_clause' already defines 'PRAGMA_OACC_CLAUSE_SELF', but it has no longer been used for the 'update' directive's 'self' clause as of 2018 commit 829c6349e96c5bfa8603aaef8858b38e237a2f33 (Subversion r261813) "Update OpenACC data clause semantics to the 2.5 behavior". That one instead mapped the 'self' pragma token to the 'host' one (same semantics). That means that we're later not able to tell whether originally we had seen 'self' or 'host', which was OK as long as only the 'update' directive had a 'self' clause. However, as of recent commit 3a3596389c2e539cb8fd5dc5784a4e2afe193a2a "OpenACC 2.7: Implement self clause for compute constructs", also OpenACC compute constructs may have a 'self' clause -- with different semantics. That means, we need to know which OpenACC directive we're parsing clauses for, which can be done in a simpler way than in that commit, similar to how the OpenMP 'to' clause is handled. While at that, clarify that (already in OpenACC 2.0a) "The 'host' clause is a synonym for the 'self' clause." -- not the other way round. gcc/c/ * c-parser.cc (c_parser_omp_clause_name): Return 'PRAGMA_OACC_CLAUSE_SELF' for "self". (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust. (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal parameter, and instead locally determine whether we're called for an OpenACC compute construct or OpenACC 'update' directive. (c_parser_oacc_compute): Adjust. gcc/cp/ * parser.cc (cp_parser_omp_clause_name): Return 'PRAGMA_OACC_CLAUSE_SELF' for "self". (cp_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust. (cp_parser_oacc_all_clauses): Remove 'bool compute_p' formal parameter, and instead locally determine whether we're called for an OpenACC compute construct or OpenACC 'update' directive. (cp_parser_oacc_compute): Adjust. gcc/fortran/ * openmp.cc (omp_mask2): Split 'OMP_CLAUSE_HOST_SELF' into 'OMP_CLAUSE_SELF', 'OMP_CLAUSE_HOST'. (gfc_match_omp_clauses, OACC_UPDATE_CLAUSES): Adjust.
Diffstat (limited to 'gcc/tree-pretty-print.cc')
0 files changed, 0 insertions, 0 deletions