public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Filip Kastl <fkastl@suse.cz>,
	gcc-patches@gcc.gnu.org, hubicka@ucw.cz,  jakub@redhat.com
Subject: Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass
Date: Fri, 1 Sep 2023 06:34:24 +0000 (UTC)	[thread overview]
Message-ID: <nycvar.YFH.7.77.849.2309010633370.22006@jbgna.fhfr.qr> (raw)
In-Reply-To: <CA+=Sn1=hj7_=WXCbxPxB+Qam9xLE0FrQunVP_SaF0brg4db70g@mail.gmail.com>

On Thu, 31 Aug 2023, Andrew Pinski wrote:

> On Thu, Aug 31, 2023 at 5:15?AM Richard Biener via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Thu, 31 Aug 2023, Filip Kastl wrote:
> >
> > > > The most obvious places would be right after SSA construction and before RTL expansion.
> > > > Can you provide measurements for those positions?
> > >
> > > The algorithm should only remove PHIs that break SSA form minimality. Since
> > > GCC's SSA construction already produces minimal SSA form, the algorithm isn't
> > > expected to remove any PHIs if run right after the construction. I even
> > > measured it and indeed -- no PHIs got removed (except for 502.gcc_r, where the
> > > algorithm managed to remove exactly 1 PHI, which is weird).
> > >
> > > I tried putting the pass before pass_expand. There isn't a lot of PHIs to
> > > remove at that point, but there still are some.
> >
> > That's interesting.  Your placement at
> >
> >           NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */);
> >           NEXT_PASS (pass_phiopt, true /* early_p */);
> > +         NEXT_PASS (pass_sccp);
> >
> > and
> >
> >        NEXT_PASS (pass_tsan);
> >        NEXT_PASS (pass_dse, true /* use DR analysis */);
> >        NEXT_PASS (pass_dce);
> > +      NEXT_PASS (pass_sccp);
> >
> > isn't immediately after the "best" existing pass we have to
> > remove dead PHIs which is pass_cd_dce.  phiopt might leave
> > dead PHIs around and the second instance runs long after the
> > last CD-DCE.
> 
> Actually the last phiopt is run before last pass_cd_dce:

I meant the second instance of pass_sccp, not phiopt.

Richard.

  reply	other threads:[~2023-09-01  6:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 15:07 Filip Kastl
2023-08-24 15:47 ` Richard Biener
2023-08-24 15:54   ` Jakub Jelinek
2023-08-31 11:26     ` Filip Kastl
2023-08-31 11:44       ` Jakub Jelinek
2023-08-31 12:13       ` Richard Biener
2023-08-31 21:44         ` Andrew Pinski
2023-09-01  6:34           ` Richard Biener [this message]
2023-09-01 10:10         ` Filip Kastl
2023-09-01 10:53           ` Richard Biener

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=nycvar.YFH.7.77.849.2309010633370.22006@jbgna.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=fkastl@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=pinskia@gmail.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).