public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-01 12:09 ` jakub at gcc dot gnu.org
  2011-01-10 18:39 ` law at redhat dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-10-01 12:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.5                       |4.4.6


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
  2010-10-01 12:09 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC) jakub at gcc dot gnu.org
@ 2011-01-10 18:39 ` law at redhat dot com
  2011-01-12 13:51 ` law at redhat dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-10 18:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.10 18:30:58
                 CC|                            |law at redhat dot com
     Ever Confirmed|0                           |1

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> 2011-01-10 18:30:58 UTC ---
The issue I see here is IRA decides it is cheaper to allocate "ext" into a
call-clobbered register (an asm makes all call-saved registers conflict with
the pseudo holding "ext").  

So with "ext" in a call-clobbered hard register, caller-saves then realizes the
value is live across calls and saves/restores it appropriately.

Regardless of whether or not the pseudo is allocated or not to a call clobbered
register we're going to be loading it from memory (either the caller-save slot
or the constant pool).

However, when allocated to a call-clobbered register, we have an extra store
(to initialize the caller-save slot) and additional stack space.  So in theory
we ought to be able to easily determine that allocating a call-clobbered hard
reg for this value isn't a win.

I'm still poking.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
  2010-10-01 12:09 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC) jakub at gcc dot gnu.org
  2011-01-10 18:39 ` law at redhat dot com
@ 2011-01-12 13:51 ` law at redhat dot com
  2011-01-17 16:14 ` law at redhat dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-12 13:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> 2011-01-12 13:38:20 UTC ---
First I think we need to note that if we allocate the pseudo holding the value
for "ext" in memory that we get some savings (because "ext" is already sitting
in memory waiting to be used).

This is very similar to how we recognize some savings from allocating a pseudo
to memory when the pseudo represents an argument loaded from its stack slot in
ira-costs.

Second, in that same code, we're double-counting the cost of allocating the
pseudo to memory.

If those two problems are fixed, we get the desired PPC code; however,
significant benchmarking would be required to determine how this change affects
a broader codebase.

I'll note there's also a deficiency in caller-saves in that it insists on
reloading the value into its original hard reg, even if the hard reg is going
to be immediately copied to a different hard reg.  I don't want to spend too
much time on the caller-save aspects since ultimately I think caller-save needs
to go away or at least have another rewrite.  It's approaching 2 decades since
it's last major revision.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-01-12 13:51 ` law at redhat dot com
@ 2011-01-17 16:14 ` law at redhat dot com
  2011-01-21 17:26 ` law at redhat dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-17 16:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |law at redhat dot com
                   |gnu.org                     |

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> 2011-01-17 16:05:40 UTC ---
Some sniff testing on x86 shows that fixing this also helps x86, so I'll be
doing more rigorous benchmarking.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-01-17 16:14 ` law at redhat dot com
@ 2011-01-21 17:26 ` law at redhat dot com
  2011-01-25 14:52 ` law at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-21 17:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #7 from Jeffrey A. Law <law at redhat dot com> 2011-01-21 17:13:35 UTC ---
SPEC 2k6 testing on x86-64 is a wash for integer codes.  Small improvement for
403.gcc 462.libquantum and small regressions for 456.hmmr and 471.omnetpp are
evident.  There's a couple other tests which seem to have a tiny bias for
improvement, but without many more runs it'd be impossible to know if the
improvements are in the noise or not.  The net specint change is a 14.5 ->
14.6, but I wouldn't put a lot of stock into that.

FP shows a big improvement for 454.calculix and a small improvement for
459.gemsfdtd.  Small regressions are seen for 410.bwaves, 433.milc and
434.zeusmp, and 437.leslie3d.  The improvement for calculix dwarfs the minor
regressions and is probably responsible for the 13.6->13.7 improvement in the
FP base.

I've also verified that the patch consistently improves code density on x86 and
gives us the desired code on PPC for the testcase in the PR.

And, at least in my mind, the patch makes sense and I'll be posting it shortly.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-01-21 17:26 ` law at redhat dot com
@ 2011-01-25 14:52 ` law at gcc dot gnu.org
  2011-01-25 14:55 ` law at redhat dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at gcc dot gnu.org @ 2011-01-25 14:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #8 from Jeffrey A. Law <law at gcc dot gnu.org> 2011-01-25 14:10:51 UTC ---
Author: law
Date: Tue Jan 25 14:10:46 2011
New Revision: 169231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169231
Log:
    PR rtl-optimization/37273
    * ira-costs.c (scan_one_insn): Detect constants living in memory and
    handle them like argument loads from stack slots.  Do not double
    count memory for memory constants and argument loads from stack slots.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-costs.c


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-01-25 14:52 ` law at gcc dot gnu.org
@ 2011-01-25 14:55 ` law at redhat dot com
  2011-01-27  0:17 ` law at redhat dot com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-25 14:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.4.6                       |4.6.0

--- Comment #9 from Jeffrey A. Law <law at redhat dot com> 2011-01-25 14:11:33 UTC ---
Fixed


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2011-01-25 14:55 ` law at redhat dot com
@ 2011-01-27  0:17 ` law at redhat dot com
  2011-02-02 17:47 ` dnovillo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-01-27  0:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #10 from Jeffrey A. Law <law at redhat dot com> 2011-01-26 22:47:02 UTC ---
Followup patch:

http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01938.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2011-01-27  0:17 ` law at redhat dot com
@ 2011-02-02 17:47 ` dnovillo at gcc dot gnu.org
  2011-02-15 21:24 ` law at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2011-02-02 17:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #11 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-02-02 17:46:20 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:18 2011
New Revision: 169579

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169579
Log:
    PR rtl-optimization/37273
    * ira-costs.c (scan_one_insn): Detect constants living in memory and
    handle them like argument loads from stack slots.  Do not double
    count memory for memory constants and argument loads from stack slots.

Modified:
    branches/google/integration/gcc/ChangeLog
    branches/google/integration/gcc/ira-costs.c


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2011-02-02 17:47 ` dnovillo at gcc dot gnu.org
@ 2011-02-15 21:24 ` law at gcc dot gnu.org
  2011-02-15 21:30 ` law at redhat dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: law at gcc dot gnu.org @ 2011-02-15 21:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #12 from Jeffrey A. Law <law at gcc dot gnu.org> 2011-02-15 21:22:03 UTC ---
Author: law
Date: Tue Feb 15 21:21:59 2011
New Revision: 170199

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170199
Log:

    Revert
    2011-01-25  Jeff Law  <law@redhat.com>

    PR rtl-optimization/37273
    * ira-costs.c (scan_one_insn): Detect constants living in memory and
    handle them like argument loads from stack slots.  Do not double
    count memory for memory constants and argument loads from stack slots.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-costs.c


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2011-02-15 21:24 ` law at gcc dot gnu.org
@ 2011-02-15 21:30 ` law at redhat dot com
  2011-03-17 20:10 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6/4.7 " law at gcc dot gnu.org
  2011-03-17 20:21 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-02-15 21:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
             Blocks|                            |46542
         Resolution|FIXED                       |
   Target Milestone|4.6.0                       |4.7.0

--- Comment #13 from Jeffrey A. Law <law at redhat dot com> 2011-02-15 21:24:13 UTC ---
Patch reverted due to exposing several latent bugs.  Bugfixes for the latent
issues have been kept.  Patch queued for gcc-4.7.  Prior to installing for
gcc-4.7 sparc-rtems needs testing.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6/4.7 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2011-02-15 21:30 ` law at redhat dot com
@ 2011-03-17 20:10 ` law at gcc dot gnu.org
  2011-03-17 20:21 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: law at gcc dot gnu.org @ 2011-03-17 20:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #14 from Jeffrey A. Law <law at gcc dot gnu.org> 2011-03-17 20:08:06 UTC ---
Author: law
Date: Thu Mar 17 20:08:01 2011
New Revision: 171111

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171111
Log:

    PR rtl-optimization/37273
    * ira-costs.c (scan_one_insn): Detect constants living in memory and
    handle them like argument loads from stack slots.  Do not double
    count memory for memory constants and argument loads from stack slots.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-costs.c


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6/4.7 Regression] IRA does not re-materializes addresses (loads from the TOC)
       [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2011-03-17 20:10 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6/4.7 " law at gcc dot gnu.org
@ 2011-03-17 20:21 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2011-03-17 20:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #15 from Jeffrey A. Law <law at redhat dot com> 2011-03-17 20:17:23 UTC ---
reinstalling fix now that we're open for stage1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)
  2008-08-29  5:01 [Bug rtl-optimization/37273] New: [4.4 " pinskia at gcc dot gnu dot org
@ 2010-04-30  9:01 ` jakub at gcc dot gnu dot org
  0 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-30  9:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.4                       |4.4.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-03-17 20:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-37273-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 12:09 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC) jakub at gcc dot gnu.org
2011-01-10 18:39 ` law at redhat dot com
2011-01-12 13:51 ` law at redhat dot com
2011-01-17 16:14 ` law at redhat dot com
2011-01-21 17:26 ` law at redhat dot com
2011-01-25 14:52 ` law at gcc dot gnu.org
2011-01-25 14:55 ` law at redhat dot com
2011-01-27  0:17 ` law at redhat dot com
2011-02-02 17:47 ` dnovillo at gcc dot gnu.org
2011-02-15 21:24 ` law at gcc dot gnu.org
2011-02-15 21:30 ` law at redhat dot com
2011-03-17 20:10 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6/4.7 " law at gcc dot gnu.org
2011-03-17 20:21 ` law at redhat dot com
2008-08-29  5:01 [Bug rtl-optimization/37273] New: [4.4 " pinskia at gcc dot gnu dot org
2010-04-30  9:01 ` [Bug rtl-optimization/37273] [4.4/4.5/4.6 " jakub at gcc dot gnu dot org

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