From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jeff Law <law@redhat.com>
Cc: Richard Sandiford <richard.sandiford@arm.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse
Date: Thu, 12 Mar 2020 13:23:57 -0500 [thread overview]
Message-ID: <20200312182357.GI22482@gate.crashing.org> (raw)
In-Reply-To: <c50129f180a7e3f900106c4df5caaea1397036d6.camel@redhat.com>
On Thu, Mar 12, 2020 at 12:03:08PM -0600, Jeff Law wrote:
> On Sat, 2020-02-08 at 10:41 -0600, Segher Boessenkool wrote:
> > I don't think each stanza of code should use it's own "noop-ness", no.
> Richard's patch is actually better than mine in that regard as it handles mem and
> reg nop moves in an indentical way. I don't think refactoring the cse.c code is
> advisable now though -- but I do want to fix the multiply-reported ICE on ARM and
> Richard's cse changes are the cleanest way to do that that I can see.
It looks pretty simple, yeah... All of CSE is hopelessly fragile, but
this patch does not make things worse.
> > I don't know if this patch makes matters worse or not. It doesn't seem
> > suitable for stage 4 though. And Richard said the cse.c part breaks
> > rs6000, if that is true, yes I do object ;-)
> The rs6000 port breakage is trivial to fix. In fact, I did so and ran it through
> my tester, which includes ppc64le and ppc64 a slew of *-elf targets x86 native
> and more.
I don't see anything rs6000 below? Is it just this generic code?
> @@ -5324,9 +5324,11 @@ cse_insn (rtx_insn *insn)
> }
>
> /* Similarly, lots of targets don't allow no-op
> - (set (mem x) (mem x)) moves. */
> + (set (mem x) (mem x)) moves. Even (set (reg x) (reg x))
> + might be impossible for certain registers (like CC registers). */
> else if (n_sets == 1
> - && MEM_P (trial)
> + && ! CALL_P (insn)
> + && (MEM_P (trial) || REG_P (trial))
> && MEM_P (dest)
> && rtx_equal_p (trial, dest)
> && !side_effects_p (dest)
This adds the !CALL_P (no space btw) condition, why is that?
(Is that CCmode reg-reg move comment about rs6000? Huh, we *do* have
patterns for that, or *should* have at least!)
Segher
next prev parent reply other threads:[~2020-03-12 18:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 1:04 Jeff Law
2020-02-05 6:26 ` Jakub Jelinek
2020-02-05 12:09 ` Segher Boessenkool
2020-02-05 13:31 ` Richard Sandiford
2020-02-06 13:01 ` Jeff Law
2020-02-06 13:57 ` Segher Boessenkool
2020-02-07 16:01 ` Jeff Law
2020-02-08 16:41 ` Segher Boessenkool
2020-03-12 18:03 ` Jeff Law
2020-03-12 18:23 ` Segher Boessenkool [this message]
2020-03-12 18:47 ` Jeff Law
2020-03-12 20:26 ` Segher Boessenkool
2020-03-12 20:56 ` Jeff Law
2020-03-13 10:29 ` Richard Sandiford
2020-03-12 22:11 ` Jeff Law
2020-03-13 8:09 ` Christophe Lyon
2020-03-13 21:49 ` Jeff Law
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=20200312182357.GI22482@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=richard.sandiford@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).