public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [Patch][GCC12] Fortran/OpenMP: Add 'omp depobj' and 'depend(mutexinoutset:'
Date: Wed, 17 Mar 2021 19:29:36 +0100	[thread overview]
Message-ID: <20210317182936.GJ231854@tucnak> (raw)
In-Reply-To: <338fe202-6d13-8d8e-dde2-975269266615@codesourcery.com>

On Wed, Mar 17, 2021 at 07:19:29PM +0100, Tobias Burnus wrote:
> @@ -1831,6 +1852,7 @@ show_omp_node (int level, gfc_code *c)
>      case EXEC_OMP_FLUSH: name = "FLUSH"; break;
>      case EXEC_OMP_MASTER: name = "MASTER"; break;
>      case EXEC_OMP_ORDERED: name = "ORDERED"; break;
> +    case EXEC_OMP_DEPOBJ: name = "DEPBOBJ"; break;

s/DEPBOBJ/DEPOBJ/

> +	  || omp_clauses->depobj->ts.kind != 2*gfc_index_integer_kind

Formatting (several times), I think we should use 2 * gfc_index_integer_kind

> --- a/gcc/fortran/trans-openmp.c
> +++ b/gcc/fortran/trans-openmp.c
> @@ -2545,6 +2545,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
>  		  tree decl = gfc_trans_omp_variable (n->sym, false);
>  		  if (gfc_omp_privatize_by_reference (decl))
>  		    decl = build_fold_indirect_ref (decl);
> +		  if (POINTER_TYPE_P (TREE_TYPE (decl)))
> +		    decl = build_fold_indirect_ref (decl);

I'm a little bit worried about this, are you sure it won't affect anything
but depobj?

> +  int k = -1; /* omp_clauses->destroy */
> +  if (!code->ext.omp_clauses->destroy)
> +    switch (code->ext.omp_clauses->depobj_update != OMP_DEPEND_UNSET
> +	    ? code->ext.omp_clauses->depobj_update : n->u.depend_op)
> +      {
> +      case OMP_DEPEND_IN: k = GOMP_DEPEND_IN; break;
> +      case OMP_DEPEND_OUT: k = GOMP_DEPEND_IN; break;
> +      case OMP_DEPEND_INOUT: k = GOMP_DEPEND_IN; break;
> +      case OMP_DEPEND_MUTEXINOUTSET: k = GOMP_DEPEND_MUTEXINOUTSET; break;
> +      case OMP_DEPEND_DEPOBJ: k = GOMP_DEPEND_MUTEXINOUTSET; break;

Can depobj_update be OMP_DEPEND_DEPOBJ ?

Otherwise LGTM.

	Jakub


  reply	other threads:[~2021-03-17 18:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 18:19 Tobias Burnus
2021-03-17 18:29 ` Jakub Jelinek [this message]
2021-04-20 21:15   ` Tobias Burnus

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=20210317182936.GJ231854@tucnak \
    --to=jakub@redhat.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tobias@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).