public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Oleg Endo <oleg.endo@t-online.de>
Cc: Stefan Franke <stefan@franke.ms>, gcc-help@gcc.gnu.org
Subject: Re: Additional peephole pass(es)
Date: Sat, 25 Apr 2020 07:21:17 -0500	[thread overview]
Message-ID: <20200425122117.GC17645@gate.crashing.org> (raw)
In-Reply-To: <643ff176e1e3ab08755de5edb970996c7f8a9897.camel@t-online.de>

On Sat, Apr 25, 2020 at 01:04:45PM +0900, Oleg Endo wrote:
> On Fri, 2020-04-24 at 16:36 -0500, Segher Boessenkool wrote:
> > 
> > In combine itself runs split as well (one insn to two).  And you can
> > add instruction patterns to your machine description that are only there
> > for combine: you split them to separate insns immediately again (maybe
> > this is what you meant though?)
> 
> No, that's not what I meant.  What I meant was really custom "combine-
> like" steps which combine would never do by itself.  split1 gives you a
> simple "interface" to hook into each insn without writing a full custom
> pass.

Ah right, the T reg passes.

For GCC 11 I want to do 1-to-1 combinations as well, which helps for a
bunch of things, including it can perhaps make your sett/clrt pass
superfluous.  We'll see :-)

The treg_combine pass...  I don't see why when the problem is inside a
single basic block, why then combine cannot handle it?

But of course most of the time it is over BB edges.  Maybe fwprop or
Richard's proposed new "combine2" can handle this generically?

> For example, on SH I've used that to implement additional elimination
> of sign/zero extending memory loads.  On RX I did the same to fold some
> in-memory operations, which neither combine nor peephole passes would
> catch otherwise.

Yeah, we need some more infrastructure to start to tackle that
generically (and I'm not at all sure that that will help enough).


Segher

  reply	other threads:[~2020-04-25 12:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 10:20 Stefan Franke
2020-04-20 17:34 ` Oleg Endo
2020-04-24 21:36   ` Segher Boessenkool
2020-04-25  4:04     ` Oleg Endo
2020-04-25 12:21       ` Segher Boessenkool [this message]
2020-04-24 21:07 ` Segher Boessenkool

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=20200425122117.GC17645@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=oleg.endo@t-online.de \
    --cc=stefan@franke.ms \
    /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).