public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Enabling -frename-registers?
@ 2016-05-02 11:12 Uros Bizjak
  2016-05-02 11:15 ` Bernd Schmidt
  0 siblings, 1 reply; 44+ messages in thread
From: Uros Bizjak @ 2016-05-02 11:12 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bernd Schmidt, Jeff Law

Hello!

> On 04/17/2016 08:59 PM, Jeff Law wrote:
>
>> invoke.texi has an independent list (probably incomplete! ;( of all the
>> things that -O2 enables.  Make sure to add -frename-registers to that
>> list and this is Ok for the trunk (gcc-7).
>
> This is what I committed.

The patch introduced bootstrap failure on alpha-linux-gnu.

Non-bootstrapped build regresses:

FAIL: gcc.dg/torture/pr69542.c   -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr69542.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/torture/pr69542.c   -Os  (test for excess errors)

where all failures are -fcompare-debug failures.

The failure can be reproduced with a crosscompiler to alpha-linux-gnu:

$ /ssd/uros/gcc-build-alpha/gcc/xgcc -B /ssd/uros/gcc-build-alpha/gcc
-O2 -S -fcompare-debug pr69542.c
xgcc: error: pr69542.c: -fcompare-debug failure

$ /ssd/uros/gcc-build-alpha/gcc/xgcc -B /ssd/uros/gcc-build-alpha/gcc
-O2 -S -fcompare-debug -fno-rename-registers pr69542.c
[OK]

Uros.

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: Enabling -frename-registers?
@ 2016-05-04 15:20 Wilco Dijkstra
  2016-05-04 19:06 ` Eric Botcazou
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Wilco Dijkstra @ 2016-05-04 15:20 UTC (permalink / raw)
  To: bschmidt
  Cc: gcc-patches, Ramana Radhakrishnan, nd, Richard Biener, ebotcazou,
	dje.gcc, law, segher

Bernd Schmidt wrote:
> On 05/04/2016 03:25 PM, Ramana Radhakrishnan wrote:
>> On ARM / AArch32 I haven't seen any performance data yet - the one place we are concerned 
>> about the impact is on Thumb2 code size as regrename may end up inadvertently putting more 
>> things in high registers. 
>
> In theory at least arm_preferred_rename_class is designed to make the  opposite happen. Bernd  

I do not see that working unfortunately - Thumb-2 codesize increases by a few percent even with -Os.
This is primarily due to replacing a low register with IP, which often changes a 16-bit instruction like:

    movs    r2, #8

into a 32-bit one:

    mov     ip, #8

This will also affect other targets with multiple instruction sizes. So I think it should check the 
size of the new instruction patterns and only accept a rename if it is not larger (certainly with -Os).


Also when people claim they can't see any benefit, did they check the codesize difference on SPEC2006?
On AArch64 codesize reduced uniformly due to fewer moves (and in a few cases significantly so). I expect
that to be true for other RISC targets. Simply put, reduced codesize at no performance loss = gain.

Wilco

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: Enabling -frename-registers?
@ 2016-04-29 13:02 David Edelsohn
  2016-04-29 13:33 ` Bernd Schmidt
  0 siblings, 1 reply; 44+ messages in thread
From: David Edelsohn @ 2016-04-29 13:02 UTC (permalink / raw)
  To: Bernd Schmidt, Jeffrey Law, GCC Patches; +Cc: Segher Boessenkool

How has this show general benefit for all architectures to deserve
enabling it by default at -O2?

As an aside, this change seems to be the source of a new code
generation bug affecting the PPC kernel.

Thanks, David

^ permalink raw reply	[flat|nested] 44+ messages in thread
[parent not found: <56AB9759.407@t-online.de>]

end of thread, other threads:[~2016-05-11  4:07 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 11:12 Enabling -frename-registers? Uros Bizjak
2016-05-02 11:15 ` Bernd Schmidt
2016-05-02 11:21   ` Uros Bizjak
2016-05-02 11:58     ` Uros Bizjak
2016-05-02 13:20       ` Bernd Schmidt
2016-05-03  5:30         ` Uros Bizjak
  -- strict thread matches above, loose matches on Subject: below --
2016-05-04 15:20 Wilco Dijkstra
2016-05-04 19:06 ` Eric Botcazou
2016-05-04 22:55 ` Pat Haugen
2016-05-05  7:42 ` Ramana Radhakrishnan
2016-05-05 13:00   ` Wilco Dijkstra
2016-05-05 16:24     ` Mike Stump
2016-04-29 13:02 David Edelsohn
2016-04-29 13:33 ` Bernd Schmidt
2016-04-29 13:42   ` David Edelsohn
2016-04-29 13:44     ` Bernd Schmidt
2016-04-29 13:48       ` David Edelsohn
2016-04-29 14:21         ` Richard Biener
2016-04-30  7:57           ` Andreas Schwab
2016-05-03 21:26           ` David Edelsohn
2016-05-03 22:53             ` Bernd Schmidt
2016-05-03 23:09               ` David Edelsohn
2016-05-04  8:39               ` Richard Biener
2016-05-04  9:05               ` Alan Modra
2016-05-04  9:08                 ` Bernd Schmidt
2016-05-04  9:38                   ` Alan Modra
2016-05-04 10:03             ` Eric Botcazou
2016-05-04 10:11               ` Bernd Schmidt
2016-05-04 10:26                 ` Eric Botcazou
2016-05-04 13:25                   ` Ramana Radhakrishnan
2016-05-04 13:37                     ` Bernd Schmidt
2016-05-04 13:39                       ` Ramana Radhakrishnan
2016-05-04 12:54                 ` David Edelsohn
2016-05-04 17:50                 ` Segher Boessenkool
2016-04-30  2:14   ` Segher Boessenkool
2016-05-02 13:32   ` Jeff Law
2016-05-11  4:07     ` Jeff Law
     [not found] <56AB9759.407@t-online.de>
2016-01-29 17:34 ` Bernd Schmidt
2016-01-29 18:50   ` Richard Biener
2016-04-17 21:24   ` Jeff Law
2016-04-26 12:44     ` Bernd Schmidt
2016-04-27  7:11       ` Eric Botcazou
2016-04-27  9:58         ` Bernd Schmidt
2016-04-27 10:36           ` Eric Botcazou

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).