public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>,
		"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] Remove parallell annotation from DO CONCURRENT
Date: Tue, 10 Apr 2018 06:44:00 -0000	[thread overview]
Message-ID: <CAFiYyc1pqdDtxagQpkEAe6M+4JQPC7t3qaLgkEK6bgXbGSDedg@mail.gmail.com> (raw)
In-Reply-To: <f4c9c32d-a03b-4e1a-5478-eaa6da773547@netcologne.de>

On Mon, Apr 9, 2018 at 10:58 PM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hi Steve,
>
>> On Mon, Apr 09, 2018 at 10:10:13PM +0200, Thomas Koenig wrote:
>>>
>>>
>>> the attached patch removes the parallel annotation from DO CONCURRENT.
>>> As discussed in the PR, the autoparallellizer currently generates
>>> wrong code. The only feasible way is to disable the annotation for
>>> gcc-8 and work on the wrong-code issues for gcc-9. This is an 8
>>> regression.
>>>
>>> Regression-tested. OK for trunk?
>>>
>>
>> Yes.
>
>
> Thanks for the review!
>
> However, just as I was about to commit, I thought of something else
> and, hopefully, better.
>
> The underlying problem is that the annotation does not go together
> with -ftree-parallelize-loops - so let's simply not set it if that
> flag is set.
>
> This way, we can avoid speed regressions for people who do not use
> -ftree-parallelize-loops, and it will be possible to downgrade the
> PR to a missed-optimization bug; it is also not necessary to xfail
> vect-do-concurrent-1.f90
>
> Regression-tested. OK for trunk, for this version?

flag_tree_parallelize_loops is 1 by default (and doesn't parallelize then,
the flag specifies the number of threads).  The pass is also run if
flag_openacc.

Note that setting the attribute is only ever useful for autopar, nothing
else looks at it.  I think before I made the change there was the
ivdep flag set which should be still valid (in fact lowering of parallel_kind
sets both can_be_parallel and safelen).

So I suggest to instead unconditonally replace parallel_kind with
ivdep_kind.

Richard.

>
> 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
>         PR fortran/83064
>         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
>         parallell processing of DO CONCURRENT -ftree-parallelize-loops
>         is set.
>
> 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
>         PR fortran/83064
>         * gfortran.dg/do_concurrent_5.f90: New test.
>         * gfortran.dg/vect/vect-do-concurrent-1.f90: Adjust dg-bogus
>         message.

  parent reply	other threads:[~2018-04-10  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 20:10 Thomas Koenig
2018-04-09 20:28 ` Steve Kargl
2018-04-09 20:58   ` Thomas Koenig
2018-04-09 21:19     ` Steve Kargl
2018-04-10  6:44     ` Richard Biener [this message]
2018-04-10 13:36     ` Jakub Jelinek
2018-04-10 21:50       ` Thomas Koenig
2018-04-11 18:35         ` Jakub Jelinek
2018-04-11 18:18           ` Thomas Koenig
2018-04-11 18:35             ` Jakub Jelinek
2018-04-11 19:47               ` Thomas Koenig
2018-04-12  7:17                 ` Jakub Jelinek
2018-04-12 21:14                   ` Thomas Koenig
2018-04-12 21:35                     ` Jakub Jelinek
2018-04-09 23:35 ` Jakub Jelinek

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=CAFiYyc1pqdDtxagQpkEAe6M+4JQPC7t3qaLgkEK6bgXbGSDedg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    --cc=tkoenig@netcologne.de \
    /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).