From: Segher Boessenkool <segher@kernel.crashing.org>
To: Alan Modra <amodra@gmail.com>
Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com
Subject: Re: [PATCH] rs6000: Use SAVE_MULTIPLE only if we restore what it saves (PR80938)
Date: Thu, 10 Aug 2017 13:46:00 -0000 [thread overview]
Message-ID: <20170810133924.GA13471@gate.crashing.org> (raw)
In-Reply-To: <20170810044740.GK16312@bubble.grove.modra.org>
On Thu, Aug 10, 2017 at 02:17:40PM +0930, Alan Modra wrote:
> > > Ick, looks like papering over the real problem to me, and will no
> > > doubt cause -Os size regressions.
> >
> > I think it is very directly solving the real problem. It isn't likely
> > to cause size regressions (look how long it took for this PR to show
> > up, so this cannot happen often).
> >
> > This only happens if r30 (the PIC reg) is used but r31 isn't; which means
> > that a) there are no other registers to save, or b) the function is marked
> > as needing a hard frame pointer but eventually doesn't need one.
> >
> > (RA picks the registers r31, r30, ... in sequence).
> >
> > In the case in the PR, this patch replaces one insn by one (cheaper)
> > insn.
>
> And in other cases your patch will prevent stmw when it should be
> used. Testcase attached. It shows the wrong use of lmw too.
I dunno... If you change r25 to r14 in that testcase it will use stmw 14
with my patch reverted. Not very reasonable imho (but then again, people
using register asm like this get what they deserve anyway).
Segher
next prev parent reply other threads:[~2017-08-10 13:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 21:16 Segher Boessenkool
2017-08-10 4:18 ` Alan Modra
2017-08-10 4:44 ` Segher Boessenkool
2017-08-10 5:26 ` Alan Modra
2017-08-10 13:46 ` Segher Boessenkool [this message]
2017-08-11 4:58 ` [RS6000] PR 80938, Don't emit eh_frame for regs that don't need saving Alan Modra
2017-08-15 10:40 ` Segher Boessenkool
2017-08-16 0:13 ` Alan Modra
2017-08-17 2:23 ` Segher Boessenkool
2017-08-17 5:28 ` Alan Modra
2017-08-17 5:50 ` 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=20170810133924.GA13471@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=amodra@gmail.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/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).