From: Jakub Jelinek Date: Tue, 10 Jul 2018 10:54:09 +0000 (+0200) Subject: svn merge -r261156:262536 svn+ssh://gcc.gnu.org/svn/gcc/trunk X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde9e042f4452b5fc7afd76e2a0f28983a2e9270;p=thirdparty%2Fgcc.git svn merge -r261156:262536 svn+ssh://gcc.gnu.org/svn/gcc/trunk From-SVN: r262538 --- fde9e042f4452b5fc7afd76e2a0f28983a2e9270 diff --cc gcc/c/c-parser.c index 643b7e23cc5e,7a926285f3a9..3cf3eea886da --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@@ -11293,8 -11279,8 +11295,10 @@@ c_parser_omp_clause_name (c_parser *par result = PRAGMA_OACC_CLAUSE_HOST; break; case 'i': - if (!strcmp ("in_reduction", p)) + if (!strcmp ("if_present", p)) + result = PRAGMA_OACC_CLAUSE_IF_PRESENT; ++ else if (!strcmp ("in_reduction", p)) + result = PRAGMA_OMP_CLAUSE_IN_REDUCTION; else if (!strcmp ("inbranch", p)) result = PRAGMA_OMP_CLAUSE_INBRANCH; else if (!strcmp ("independent", p)) @@@ -11383,13 -11371,9 +11391,11 @@@ result = PRAGMA_OMP_CLAUSE_SIMD; else if (!strcmp ("simdlen", p)) result = PRAGMA_OMP_CLAUSE_SIMDLEN; - else if (!strcmp ("self", p)) - result = PRAGMA_OACC_CLAUSE_SELF; break; case 't': - if (!strcmp ("taskgroup", p)) + if (!strcmp ("task_reduction", p)) + result = PRAGMA_OMP_CLAUSE_TASK_REDUCTION; + else if (!strcmp ("taskgroup", p)) result = PRAGMA_OMP_CLAUSE_TASKGROUP; else if (!strcmp ("thread_limit", p)) result = PRAGMA_OMP_CLAUSE_THREAD_LIMIT; @@@ -14470,15 -13998,9 +14450,11 @@@ c_parser_oacc_all_clauses (c_parser *pa c_name = "private"; break; case PRAGMA_OACC_CLAUSE_REDUCTION: - clauses = c_parser_omp_clause_reduction (parser, clauses); + clauses + = c_parser_omp_clause_reduction (parser, OMP_CLAUSE_REDUCTION, + clauses); c_name = "reduction"; break; - case PRAGMA_OACC_CLAUSE_SELF: - clauses = c_parser_oacc_data_clause (parser, c_kind, clauses); - c_name = "self"; - break; case PRAGMA_OACC_CLAUSE_SEQ: clauses = c_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ, clauses); diff --cc gcc/cp/cxx-pretty-print.c index e08d07aa428e,df81aa37ce89..d686b991c805 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@@ -2068,42 -2068,6 +2068,42 @@@ cxx_pretty_printer::statement (tree t declaration (t); break; + case OMP_DEPOBJ: + pp_cxx_ws_string (this, "#pragma omp depobj"); + pp_space (this); + pp_cxx_left_paren (this); + expression (OMP_DEPOBJ_DEPOBJ (t)); + pp_cxx_right_paren (this); + if (OMP_DEPOBJ_CLAUSES (t) && OMP_DEPOBJ_CLAUSES (t) != error_mark_node) + { + if (TREE_CODE (OMP_DEPOBJ_CLAUSES (t)) == OMP_CLAUSE) + dump_omp_clauses (this, OMP_DEPOBJ_CLAUSES (t), - pp_indentation (this), 0); ++ pp_indentation (this), TDF_NONE); + else + switch (tree_to_uhwi (OMP_DEPOBJ_CLAUSES (t))) + { + case OMP_CLAUSE_DEPEND_IN: + pp_cxx_ws_string (this, " update(in)"); + break; + case OMP_CLAUSE_DEPEND_INOUT: + pp_cxx_ws_string (this, " update(inout)"); + break; + case OMP_CLAUSE_DEPEND_OUT: + pp_cxx_ws_string (this, " update(out)"); + break; + case OMP_CLAUSE_DEPEND_MUTEXINOUTSET: + pp_cxx_ws_string (this, " update(mutexinoutset)"); + break; + case OMP_CLAUSE_DEPEND_LAST: + pp_cxx_ws_string (this, " destroy"); + break; + default: + break; + } + } + pp_needs_newline (this) = true; + break; + default: c_pretty_printer::statement (t); break; diff --cc gcc/cp/parser.c index 681de3cd10ba,366a0d894602..7985aa26151d --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@@ -31401,8 -31427,8 +31428,10 @@@ cp_parser_omp_clause_name (cp_parser *p result = PRAGMA_OACC_CLAUSE_HOST; break; case 'i': - if (!strcmp ("in_reduction", p)) + if (!strcmp ("if_present", p)) + result = PRAGMA_OACC_CLAUSE_IF_PRESENT; ++ else if (!strcmp ("in_reduction", p)) + result = PRAGMA_OMP_CLAUSE_IN_REDUCTION; else if (!strcmp ("inbranch", p)) result = PRAGMA_OMP_CLAUSE_INBRANCH; else if (!strcmp ("independent", p)) @@@ -34261,15 -33871,9 +34265,11 @@@ cp_parser_oacc_all_clauses (cp_parser * c_name = "private"; break; case PRAGMA_OACC_CLAUSE_REDUCTION: - clauses = cp_parser_omp_clause_reduction (parser, clauses); + clauses + = cp_parser_omp_clause_reduction (parser, OMP_CLAUSE_REDUCTION, + clauses); c_name = "reduction"; break; - case PRAGMA_OACC_CLAUSE_SELF: - clauses = cp_parser_oacc_data_clause (parser, c_kind, clauses); - c_name = "self"; - break; case PRAGMA_OACC_CLAUSE_SEQ: clauses = cp_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ, clauses, here); diff --cc gcc/gimple-pretty-print.c index 74e613fc6ad1,19cdb40d73a5..ef92dabcc67d --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@@ -1558,35 -1555,6 +1555,35 @@@ dump_gimple_omp_single (pretty_printer } } +/* Dump a GIMPLE_OMP_TASKGROUP tuple on the pretty_printer BUFFER. */ + +static void +dump_gimple_omp_taskgroup (pretty_printer *buffer, gimple *gs, - int spc, int flags) ++ int spc, dump_flags_t flags) +{ + if (flags & TDF_RAW) + { + dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs, + gimple_omp_body (gs)); + dump_omp_clauses (buffer, gimple_omp_taskgroup_clauses (gs), spc, flags); + dump_gimple_fmt (buffer, spc, flags, " >"); + } + else + { + pp_string (buffer, "#pragma omp taskgroup"); + dump_omp_clauses (buffer, gimple_omp_taskgroup_clauses (gs), spc, flags); + if (!gimple_seq_empty_p (gimple_omp_body (gs))) + { + newline_and_indent (buffer, spc + 2); + pp_left_brace (buffer); + pp_newline (buffer); + dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags); + newline_and_indent (buffer, spc + 2); + pp_right_brace (buffer); + } + } +} + /* Dump a GIMPLE_OMP_TARGET tuple on the pretty_printer BUFFER. */ static void diff --cc gcc/omp-low.c index 14ce032402c5,c591231d8f16..de6d09940105 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@@ -1328,7 -1320,8 +1320,9 @@@ scan_sharing_clauses (tree clauses, omp case OMP_CLAUSE_TILE: case OMP_CLAUSE__SIMT_: case OMP_CLAUSE_DEFAULT: + case OMP_CLAUSE_NONTEMPORAL: + case OMP_CLAUSE_IF_PRESENT: + case OMP_CLAUSE_FINALIZE: break; case OMP_CLAUSE_ALIGNED: