From: Oleg Endo <oleg.endo@t-online.de>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Stefan Franke <stefan@franke.ms>, gcc-help@gcc.gnu.org
Subject: Re: Additional peephole pass(es)
Date: Sat, 25 Apr 2020 13:04:45 +0900 [thread overview]
Message-ID: <643ff176e1e3ab08755de5edb970996c7f8a9897.camel@t-online.de> (raw)
In-Reply-To: <20200424213630.GD26902@gate.crashing.org>
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.
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.
> Another big problem is that it is very, very hard to write a *correct*
> (non-trivial) peephole2.
>
I agree. Combine patterns are easier to deal with.
Cheers,
Oleg
next prev parent reply other threads:[~2020-04-25 4:04 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 [this message]
2020-04-25 12:21 ` Segher Boessenkool
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=643ff176e1e3ab08755de5edb970996c7f8a9897.camel@t-online.de \
--to=oleg.endo@t-online.de \
--cc=gcc-help@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--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).