public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Cc: nd <nd@arm.com>
Subject: Re: [PATCH] Fix PR46932: Block auto increment on frame pointer
Date: Tue, 25 Jul 2017 20:42:00 -0000	[thread overview]
Message-ID: <27a1b18b-a698-f50d-f026-1dc956e3c673@redhat.com> (raw)
In-Reply-To: <AM5PR0802MB2610C93E52AAFEFD3A1DA5B283A70@AM5PR0802MB2610.eurprd08.prod.outlook.com>

On 07/20/2017 08:49 AM, Wilco Dijkstra wrote:
> Block auto increment on frame pointer references.  This is never
> beneficial since the SFP expands into SP+C or FP+C during register
> allocation.  The generated code for the testcase is now as expected:
> 
> 	str	x30, [sp, -32]!
> 	strb	w0, [sp, 31]
> 	add	x0, sp, 31
> 	bl	foo3
> 	ldr	x30, [sp], 32
> 	ret
> 
> On SPEC2017 codesize improves uniformly across the board.
> 
> ChangeLog:
> 2017-07-20  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	PR middle-end/46932
> 	* auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
> 
> gcc/testsuite/
> 
> 	* gcc.dg/pr46932.c: New testcase.
My only concern here would be cases where we don't end up eliminating FP
to SP.  But I'd think it's unlikely that we'd have enough auto-inc
opportunities on the frame pointer for it to matter much anyway.

OK for the trunk.

jeff

  reply	other threads:[~2017-07-25 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 14:49 Wilco Dijkstra
2017-07-25 20:42 ` Jeff Law [this message]
2017-07-25 21:25   ` Wilco Dijkstra
2017-07-25 22:29     ` 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=27a1b18b-a698-f50d-f026-1dc956e3c673@redhat.com \
    --to=law@redhat.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@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).