From: Tom de Vries <Tom_deVries@mentor.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: [gomp4, committed] Add counter inits to zero_iter_bb in expand_omp_for_init_counts
Date: Thu, 08 Oct 2015 08:33:00 -0000 [thread overview]
Message-ID: <561629FD.4090908@mentor.com> (raw)
In-Reply-To: <560D3716.9020804@mentor.com>
[ was: Re: [patch] Add counter inits to zero_iter_bb in
expand_omp_for_init_counts ]
On 01/10/15 15:37, Tom de Vries wrote:
> On 01/10/15 14:49, Jakub Jelinek wrote:
>> On Thu, Oct 01, 2015 at 02:46:01PM +0200, Tom de Vries wrote:
>>> this patch adds initialization in zero_iter_bb of counters introduced in
>>> expand_omp_for_init_counts.
>>>
>>> This removes the need to set TREE_NO_WARNING on those counters.
>>
>> Why do you think it is a good idea?
>
> In replace_ssa_name, I've recently added the assert:
> ...
> gcc_assert (!SSA_NAME_IS_DEFAULT_DEF (name));
> ...
>
> On the gomp-4_0-branch, this assert triggers for a collapsed acc loop,
> which uses expand_omp_for_generic for omp-expansion. The assert
> triggers because (some of) the counters added by
> expand_omp_for_init_counts are not initialized on all paths.
>
> On trunk, for the test-case in the patch, this assert doesn't trigger
> because the omp function is split off before ssa.
>
>> I'd be afraid it slows things down unnecessarily.
>
> I think zero_iter_bb is a block that is expected not to be executed
> frequently.
>
> I've attached an sdiff of x86_64 assembly for the test-case (before
> left, after right). AFAICT, this patch has the effect that it speeds up
> the frequent path with one instruction.
>
>> Furthermore, I'd prefer not to change this area of code before
>> gomp-4_1-branch is merged, as it will be a nightmare for the merge
>> otherwise.
>
> Committing to gomp-4_0-branch for now would work for me.
>
Committed to gomp-4_0-branch.
Thanks,
- Tom
next prev parent reply other threads:[~2015-10-08 8:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 12:46 [patch] " Tom de Vries
2015-10-01 12:49 ` Jakub Jelinek
2015-10-01 13:38 ` Tom de Vries
2015-10-08 8:33 ` Tom de Vries [this message]
2015-10-23 14:40 ` Thomas Schwinge
2015-10-28 9:50 ` Tom de Vries
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=561629FD.4090908@mentor.com \
--to=tom_devries@mentor.com \
--cc=gcc-patches@gnu.org \
--cc=jakub@redhat.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).