public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, Cesar Philippidis <cesar@codesourcery.com>
Subject: Re: OMP_CLAUSES with clauses in operand 0
Date: Wed, 29 Apr 2015 14:52:00 -0000	[thread overview]
Message-ID: <20150429143624.GI1751@tucnak.redhat.com> (raw)
In-Reply-To: <871tj3roor.fsf@schwinge.name>

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

  reply	other threads:[~2015-04-29 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <553E695A.2070007@mentor.com>
     [not found] ` <87zj5ttqpz.fsf@schwinge.name>
     [not found]   ` <553E787A.1020109@mentor.com>
2015-04-28 19:30     ` Fix OpenMP's target update directive in templated code Thomas Schwinge
2015-04-29  9:00       ` Jakub Jelinek
2015-04-29  9:30         ` Thomas Schwinge
2015-04-29  9:32         ` OMP_CLAUSES with clauses in operand 0 (was: Fix OpenMP's target update directive in templated code) Thomas Schwinge
2015-04-29 10:06           ` Jakub Jelinek
2015-04-29 11:14             ` OMP_CLAUSES with clauses in operand 0 Thomas Schwinge
2015-04-29 11:55               ` Jakub Jelinek
2015-04-29 14:37                 ` Thomas Schwinge
2015-04-29 14:52                   ` Jakub Jelinek [this message]
2015-04-29 15:46                     ` Thomas Schwinge
2015-04-29 16:04                       ` Jakub Jelinek
2015-04-29 16:07                         ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150429143624.GI1751@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=cesar@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).