public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Bin Cheng <Bin.Cheng@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH PR82726][1/2]Revert previous fixes for PR70754 and PR79663
Date: Tue, 07 Nov 2017 10:49:00 -0000	[thread overview]
Message-ID: <CAFiYyc062k0q-bwjV-f=OGmHsgea0xdXYT0fVoNgYLuoaHUO=w@mail.gmail.com> (raw)
In-Reply-To: <DB5PR0801MB2742F2AE7A493621CF0C35B6E75D0@DB5PR0801MB2742.eurprd08.prod.outlook.com>

On Fri, Nov 3, 2017 at 1:39 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> When fixing PR70754, I thought the issue only happens for ZERO-length chains.
> Well, that's apparently not true with PR82726.
> The whole story is, with chain combination/re-association, new stmts may be
> created/inserted at position not dominating following uses.  This happens in
> two scenarios:
>   1) Zero length chains, as in PR70754.
>   2) Non-zero chains with multiple zero distance references.
> PR82726 falls in case 2).  Because zero distance references are root of the
> chain, they don't inherit values from loop carried PHIs.  In code generation,
> we still need to be careful not inserting use before definitions.
>
> Previous fix to PR70754 tries to find dominance position for insertion when
> combining all references.  I could do the similar thing on top of that fix,
> but it would be inefficient/complicated because we should only do that for
> zero distance references in a non-zero length combined chain.
>
> This patch set fixes both PRs in the opposite way: Instead of finding dominance
> insertion position for root reference, we re-sort zero-distance references of
> combined chain by their position information so that new root reference must
> dominate others.  This should be more efficient because we avoid function call
> to stmt_dominates_stmt_p.
>
> This is the first patch reverting r244815 and r245689.
>
> Bootstrap and test on x86_64 and AArch64 in patch set.  Is it OK?

Ok.

Richard.


> Thanks,
> bin
> 2017-11-02  Bin Cheng  <bin.cheng@arm.com>
>
>         PR tree-optimization/82726
>         Revert
>         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
>
>         PR tree-optimization/70754
>         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
>         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
>         combined stmt before it if not NULL.
>         (combine_chains): Process refs reversely and compute dominance point
>         for root ref.
>
>         Revert
>         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
>
>         PR tree-optimization/79663
>         * tree-predcom.c (combine_chains): Process refs in reverse order
>         only for ZERO length chains, and add explaining comment.

      reply	other threads:[~2017-11-07 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 12:39 Bin Cheng
2017-11-07 10:49 ` Richard Biener [this message]

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='CAFiYyc062k0q-bwjV-f=OGmHsgea0xdXYT0fVoNgYLuoaHUO=w@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=Bin.Cheng@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.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).