This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: OMP_CLAUSES with clauses in operand 0
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Cesar Philippidis <cesar at codesourcery dot com>
- Date: Wed, 29 Apr 2015 16:36:24 +0200
- Subject: Re: OMP_CLAUSES with clauses in operand 0
- Authentication-results: sourceware.org; auth=none
- References: <553E695A dot 2070007 at mentor dot com> <87zj5ttqpz dot fsf at schwinge dot name> <553E787A dot 1020109 at mentor dot com> <87383kt7kx dot fsf at schwinge dot name> <20150429085332 dot GC1751 at tucnak dot redhat dot com> <87egn3s2p4 dot fsf at schwinge dot name> <20150429093231 dot GD1751 at tucnak dot redhat dot com> <877fsvrxuu dot fsf at schwinge dot name> <20150429114355 dot GF1751 at tucnak dot redhat dot com> <871tj3roor dot fsf at schwinge dot name>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Apr 29, 2015 at 04:31:32PM +0200, Thomas Schwinge wrote:
> > So yes, I really prefer OMP_STANDALONE_CLAUSES over OMP_CLAUSES for
> > everything.
>
> Like this (for trunk)?
>
> commit 300e28fce192cb56d73cb61f787872643030f0bf
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date: Wed Apr 29 16:18:49 2015 +0200
>
> Add OMP_STANDALONE_CLAUSES.
>
> gcc/
> * tree.h (OACC_CACHE_CLAUSES, OACC_DECLARE_CLAUSES)
> (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
> (OACC_UPDATE_CLAUSES, OMP_TARGET_UPDATE_CLAUSES): Merge into...
> (OMP_STANDALONE_CLAUSES): ... this new macro. Adjust all users.
I would keep the specific *_CLAUSES macros, just add
OMP_STANDALONE_CLAUSES and change the uses only if you are dealing with
multiple different codes. That will match OMP_CLAUSES vs. OMP_FOR_CLAUSES,
OMP_PARALLEL_CLAUSES etc.
> --- gcc/c/c-parser.c
> +++ gcc/c/c-parser.c
> @@ -11987,7 +11987,7 @@ c_parser_oacc_cache (location_t loc, c_parser *parser)
>
> stmt = make_node (OACC_CACHE);
> TREE_TYPE (stmt) = void_type_node;
> - OACC_CACHE_CLAUSES (stmt) = clauses;
> + OMP_STANDALONE_CLAUSES (stmt) = clauses;
> SET_EXPR_LOCATION (stmt, loc);
> add_stmt (stmt);
>
So, drop hunks like this.
> @@ -12155,10 +12155,7 @@ c_parser_oacc_enter_exit_data (c_parser *parser, bool enter)
>
> stmt = enter ? make_node (OACC_ENTER_DATA) : make_node (OACC_EXIT_DATA);
> TREE_TYPE (stmt) = void_type_node;
> - if (enter)
> - OACC_ENTER_DATA_CLAUSES (stmt) = clauses;
> - else
> - OACC_EXIT_DATA_CLAUSES (stmt) = clauses;
> + OMP_STANDALONE_CLAUSES (stmt) = clauses;
> SET_EXPR_LOCATION (stmt, loc);
> add_stmt (stmt);
> }
And just keep ones like this.
Jakub