public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/37948]  New: [4.4 Regression] IRA generates slower code for -mtune=core2
@ 2008-10-29  5:39 hjl dot tools at gmail dot com
  2008-10-29  5:46 ` [Bug rtl-optimization/37948] " hjl dot tools at gmail dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-10-29  5:39 UTC (permalink / raw)
  To: gcc-bugs

+++ This bug was initially created as a clone of Bug #37364 +++

Testcase in PR 37364:

http://gcc.gnu.org/bugzilla/attachment.cgi?id=16536

shows IRA generates slower code for -mtune=core2.

$ gcc -m32 -O2 -mssse3 -mfpmath=sse 36.c
$ time -p ./a.out
real 7.97
$ gcc -m32 -O2 -mssse3 -mfpmath=sse -mtune=core2 -o core2.exe 36.c
$ time -p ./core2.exe
real 12.27


-- 
           Summary: [4.4 Regression] IRA generates slower code for -
                    mtune=core2
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, ra
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu
 BugsThisDependsOn: 37364


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
@ 2008-10-29  5:46 ` hjl dot tools at gmail dot com
  2008-10-29  7:18 ` bonzini at gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-10-29  5:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2008-10-29 05:44 -------
It looks like the cost of loading/storing FP values aren't appropriate for
Core 2. With this patch:

[hjl@gnu-6 i386]$ diff -up i386.c.foo i386.c
--- i386.c.foo  2008-10-28 21:56:19.000000000 -0700
+++ i386.c      2008-10-28 22:01:53.000000000 -0700
@@ -990,9 +990,9 @@ struct processor_costs core2_cost = {
                                           Relative to reg-reg move (2).  */
   {4, 4, 4},                           /* cost of storing integer registers */
   2,                                   /* cost of reg,reg fld/fst */
-  {6, 6, 6},                           /* cost of loading fp registers
+  {12, 12, 12},                                /* cost of loading fp registers
                                           in SFmode, DFmode and XFmode */
-  {4, 4, 4},                           /* cost of storing fp registers
+  {6, 6, 8},                           /* cost of storing fp registers
                                           in SFmode, DFmode and XFmode */
   2,                                   /* cost of moving MMX register */
   {6, 6},                              /* cost of loading MMX registers
@@ -1000,9 +1000,9 @@ struct processor_costs core2_cost = {
   {4, 4},                              /* cost of storing MMX registers
                                           in SImode and DImode */
   2,                                   /* cost of moving SSE register */
-  {6, 6, 6},                           /* cost of loading SSE registers
+  {8, 8, 8},                           /* cost of loading SSE registers
                                           in SImode, DImode and TImode */
-  {4, 4, 4},                           /* cost of storing SSE registers
+  {8, 8, 8},                           /* cost of storing SSE registers
                                           in SImode, DImode and TImode */
   2,                                   /* MMX or SSE register to integer */
   32,                                  /* size of l1 cache.  */
[hjl@gnu-6 i386]$

I got

[hjl@gnu-6 gcc]$  ./xgcc -B./ -m32 -O2 /tmp/foo.c -o core2.sse -mtune=core2 
-msse3 -mfpmath=sse
[hjl@gnu-6 gcc]$  ./xgcc -B./ -m32 -O2 /tmp/foo.c -o core2 -mtune=core2
[hjl@gnu-6 gcc]$ ./xgcc -B./ -m32 -O2 /tmp/foo.c -o o2  -msse3 -mfpmath=sse
[hjl@gnu-6 gcc]$  ./xgcc -B./ -m32 -O2 /tmp/foo.c -o o2.sse
[hjl@gnu-6 gcc]$ time ./o2

real    0m7.163s
user    0m7.161s
sys     0m0.001s
[hjl@gnu-6 gcc]$ time ./core2

real    0m7.833s
user    0m7.829s
sys     0m0.001s
[hjl@gnu-6 gcc]$ time ./o2.sse

real    0m7.795s
user    0m7.794s
sys     0m0.000s
[hjl@gnu-6 gcc]$ time ./core2.sse

real    0m7.339s
user    0m7.337s
sys     0m0.001s
[hjl@gnu-6 gcc]$

But even with this patch, IRA still generates slower codes:

[hjl@gnu-6 gcc]$ ./xgcc -B./ -m32 -O2 /tmp/foo.c -o core2.noira -mtune=core2
-fno-ira
[hjl@gnu-6 gcc]$ time ./core2.noira

real    0m7.444s
user    0m7.441s
sys     0m0.001s
[hjl@gnu-6 gcc]$ ./xgcc -B./ -m32 -O2 /tmp/foo.c -o core2.sse.noira
-mtune=core2 -fno-ira -msse3 -mfpmath=sse
[hjl@gnu-6 gcc]$ time ./core2.sse.noira

real    0m7.229s
user    0m7.224s
sys     0m0.000s
[hjl@gnu-6 gcc]$


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
  2008-10-29  5:46 ` [Bug rtl-optimization/37948] " hjl dot tools at gmail dot com
@ 2008-10-29  7:18 ` bonzini at gnu dot org
  2008-10-29  7:25   ` Andrew Thomas Pinski
  2008-10-29  7:26 ` pinskia at gmail dot com
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 16+ messages in thread
From: bonzini at gnu dot org @ 2008-10-29  7:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bonzini at gnu dot org  2008-10-29 07:17 -------
Subject: Re:  [4.4 Regression] IRA generates slower
 code for -mtune=core2

hjl dot tools at gmail dot com wrote:
> ------- Comment #1 from hjl dot tools at gmail dot com  2008-10-29 05:44 -------
> It looks like the cost of loading/storing FP values aren't appropriate for
> Core 2. With this patch:

Good.  Is regmove still helping (which would be the wrong thing to do,
but gives a data point)?

Paolo


-- 


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


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

* Re: [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  7:18 ` bonzini at gnu dot org
@ 2008-10-29  7:25   ` Andrew Thomas Pinski
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Thomas Pinski @ 2008-10-29  7:25 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



Sent from my iPhone

On Oct 29, 2008, at 12:17 AM, "bonzini at gnu dot org" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #2 from bonzini at gnu dot org  2008-10-29 07:17  
> -------
> Subject: Re:  [4.4 Regression] IRA generates slower
> code for -mtune=core2
>
> hjl dot tools at gmail dot com wrote:
>> ------- Comment #1 from hjl dot tools at gmail dot com  2008-10-29  
>> 05:44 -------
>> It looks like the cost of loading/storing FP values aren't  
>> appropriate for
>> Core 2. With this patch:
>
> Good.  Is regmove still helping (which would be the wrong thing to do,
> but gives a data point)?

I noticed that ira ignores ! part of constraint do you know if the  
register class would change if ! was not ignored?

Thanks,
Andrew Pinsky

>
>
> Paolo
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37948
>


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
  2008-10-29  5:46 ` [Bug rtl-optimization/37948] " hjl dot tools at gmail dot com
  2008-10-29  7:18 ` bonzini at gnu dot org
@ 2008-10-29  7:26 ` pinskia at gmail dot com
  2008-10-29 13:08 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gmail dot com @ 2008-10-29  7:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gmail dot com  2008-10-29 07:25 -------
Subject: Re:  [4.4 Regression] IRA generates slower code for -mtune=core2



Sent from my iPhone

On Oct 29, 2008, at 12:17 AM, "bonzini at gnu dot org"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #2 from bonzini at gnu dot org  2008-10-29 07:17  
> -------
> Subject: Re:  [4.4 Regression] IRA generates slower
> code for -mtune=core2
>
> hjl dot tools at gmail dot com wrote:
>> ------- Comment #1 from hjl dot tools at gmail dot com  2008-10-29  
>> 05:44 -------
>> It looks like the cost of loading/storing FP values aren't  
>> appropriate for
>> Core 2. With this patch:
>
> Good.  Is regmove still helping (which would be the wrong thing to do,
> but gives a data point)?

I noticed that ira ignores ! part of constraint do you know if the  
register class would change if ! was not ignored?

Thanks,
Andrew Pinsky

>
>
> Paolo
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37948
>


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2008-10-29  7:26 ` pinskia at gmail dot com
@ 2008-10-29 13:08 ` hjl dot tools at gmail dot com
  2008-10-29 14:50 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-10-29 13:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2008-10-29 13:08 -------
(In reply to comment #2)
> Subject: Re:  [4.4 Regression] IRA generates slower
>  code for -mtune=core2
> 
> hjl dot tools at gmail dot com wrote:
> > ------- Comment #1 from hjl dot tools at gmail dot com  2008-10-29 05:44 -------
> > It looks like the cost of loading/storing FP values aren't appropriate for
> > Core 2. With this patch:
> 
> Good.  Is regmove still helping (which would be the wrong thing to do,
> but gives a data point)?
> 
> Paolo
> 

For this bug, regmove has mixed impacts with updated core2_cost:

[hjl@gnu-6 regmove]$ ../xgcc -B../ -m32 -O2 /tmp/foo.c -o core2.sse
-mtune=core2  -msse3 -mfpmath=sse
[hjl@gnu-6 regmove]$ ../xgcc -B../ -m32 -O2 /tmp/foo.c -o o2.sse   -msse3
-mfpmath=sse
[hjl@gnu-6 regmove]$ ../xgcc -B../ -m32 -O2 /tmp/foo.c -o core2 -mtune=core2   
[hjl@gnu-6 regmove]$ ../xgcc -B../ -m32 -O2 /tmp/foo.c -o o2
[hjl@gnu-6 regmove]$ time ./o2

real    0m7.995s
user    0m7.956s
sys     0m0.003s
[hjl@gnu-6 regmove]$ time ./core2

real    0m7.951s
user    0m7.950s
sys     0m0.000s
[hjl@gnu-6 regmove]$ time ./core2.sse

real    0m7.358s
user    0m7.357s
sys     0m0.000s
[hjl@gnu-6 regmove]$ time ./o2.sse

real    0m7.177s
user    0m7.176s
sys     0m0.000s
[hjl@gnu-6 regmove]$


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2008-10-29 13:08 ` hjl dot tools at gmail dot com
@ 2008-10-29 14:50 ` rguenth at gcc dot gnu dot org
  2008-10-30 21:08 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-29 14:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2008-10-29 14:50 ` rguenth at gcc dot gnu dot org
@ 2008-10-30 21:08 ` rguenth at gcc dot gnu dot org
  2008-10-30 22:53 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-10-30 21:05 -------
So, is this a target issue or a register allocator issue now?  Has the costs
fix
been applied?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code for -mtune=core2
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2008-10-30 21:08 ` rguenth at gcc dot gnu dot org
@ 2008-10-30 22:53 ` hjl dot tools at gmail dot com
  2008-11-04 19:37 ` [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-10-30 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl dot tools at gmail dot com  2008-10-30 22:51 -------
(In reply to comment #5)
> So, is this a target issue or a register allocator issue now?  Has the costs
> fix
> been applied?
> 

It is an IRA issue since -fno-ira is still faster with -mtune=generic.
IRA should be fixed first before changing Core 2 cost.


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2008-10-30 22:53 ` hjl dot tools at gmail dot com
@ 2008-11-04 19:37 ` hjl dot tools at gmail dot com
  2008-11-10 16:13 ` vmakarov at redhat dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-11-04 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2008-11-04 19:36 -------
IRA generates much slower codes:

[hjl@gnu-6 37364]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -m32  -fno-ira -o noira
foo.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -m32  -o ira foo.c
time ./noira
7.62user 0.01system 0:07.65elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+88minor)pagefaults 0swaps
time ./ira
7.81user 0.01system 0:07.83elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+87minor)pagefaults 0swaps
[hjl@gnu-6 37364]$ make
time ./noira
7.07user 0.01system 0:07.10elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+88minor)pagefaults 0swaps
time ./ira
7.96user 0.00system 0:07.97elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+87minor)pagefaults 0swaps
[hjl@gnu-6 37364]$ make
time ./noira
7.40user 0.00system 0:07.40elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+87minor)pagefaults 0swaps
time ./ira
7.81user 0.00system 0:07.82elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+87minor)pagefaults 0swaps
[hjl@gnu-6 37364]$ 


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4 Regression] IRA        |[4.4 Regression] IRA
                   |generates slower code for - |generates slower code
                   |mtune=core2                 |


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2008-11-04 19:37 ` [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code hjl dot tools at gmail dot com
@ 2008-11-10 16:13 ` vmakarov at redhat dot com
  2008-11-10 23:24 ` vmakarov at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: vmakarov at redhat dot com @ 2008-11-10 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from vmakarov at redhat dot com  2008-11-10 16:12 -------
  H.J., thanks for finding the problem and reducing the test case.

  The problem could be solved by using extended register coalescing.  Now IRA
coalesces only move insns (-fira-coalesce).  But unfortunately usage of
-fira-coalesce makes worse code in general case.  Register preferencing based
on hard register costs works generally better in IRA.

  Therefore I've tried to find what is wrong with the hard register cost
calculation.  Why loading register from its equivalent memory location and 3
usages of the register in the loop of 36.c is cheaper than 1 def and 1 usage of
another pseudo-register (that is major difference from the old register
allocator).  The problem is in usage GENERAL_REGS class to calculate saving
from loading pseudo from the equivalent memory instead of pseudo cover class
(SSE_REGS).  It gives from cost 12 instead of 6 which results in wrong choice
for spilling and worse code.

  I'll send a patch fixing this problem a bit later today.


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (8 preceding siblings ...)
  2008-11-10 16:13 ` vmakarov at redhat dot com
@ 2008-11-10 23:24 ` vmakarov at gcc dot gnu dot org
  2008-11-11  0:02 ` hjl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2008-11-10 23:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from vmakarov at gcc dot gnu dot org  2008-11-10 23:23 -------
Subject: Bug 37948

Author: vmakarov
Date: Mon Nov 10 23:21:45 2008
New Revision: 141753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141753
Log:
2008-11-07  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimizations/37948
        * ira-int.h (struct ira_allocno_copy): New member constraint_p.
        (ira_create_copy, ira_add_allocno_copy): New parameter.

        * ira-conflicts.c (process_regs_for_copy): New parameter.  Pass it
        to ira_add_allocno_copy.
        (process_reg_shuffles, add_insn_allocno_copies): Pass a new
        parameter to process_regs_for_copy.
        (propagate_copies): Pass a new parameter to ira_add_allocno_copy.
        Fix typo in passing second allocno to ira_add_allocno_copy.

        * ira-color.c (update_conflict_hard_regno_costs): Use head of
        coalesced allocnos list.
        (assign_hard_reg): Ditto.  Check that assigned allocnos are not in
        the graph.
        (add_ira_allocno_to_bucket): Rename to add_allocno_to_bucket.
        (add_ira_allocno_to_ordered_bucket): Rename to
        add_allocno_to_ordered_bucket.
        (push_ira_allocno_to_stack): Rename to push_allocno_to_stack.  Use
        head of coalesced allocnos list.
        (push_allocnos_to_stack): Remove calculation of ALLOCNO_TEMP.
        Check that it is aready calculated.
        (push_ira_allocno_to_spill): Rename to push_ira_allocno_to_spill.
        (setup_allocno_left_conflicts_num): Use head of coalesced allocnos
        list.
        (coalesce_allocnos): Do extended coalescing too.

        * ira-emit.c (add_range_and_copies_from_move_list): Pass a new
        parameter to ira_add_allocno_copy.

        * ira-build.c (ira_create_copy, ira_add_allocno_copy): Add a new
        parameter.
        (print_copy): Print copy origination too.

        * ira-costs.c (scan_one_insn): Use alloc_pref for load from
        equivalent memory.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-build.c
    trunk/gcc/ira-color.c
    trunk/gcc/ira-conflicts.c
    trunk/gcc/ira-costs.c
    trunk/gcc/ira-emit.c
    trunk/gcc/ira-int.h


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (9 preceding siblings ...)
  2008-11-10 23:24 ` vmakarov at gcc dot gnu dot org
@ 2008-11-11  0:02 ` hjl at gcc dot gnu dot org
  2008-12-06 22:07 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-11-11  0:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from hjl at gcc dot gnu dot org  2008-11-11 00:01 -------
Subject: Bug 37948

Author: hjl
Date: Mon Nov 10 23:59:57 2008
New Revision: 141756

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141756
Log:
2008-11-10  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2008-11-10  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimizations/37948
        * ira-int.h (struct ira_allocno_copy): New member constraint_p.
        (ira_create_copy, ira_add_allocno_copy): New parameter.

        * ira-conflicts.c (process_regs_for_copy): New parameter.  Pass it
        to ira_add_allocno_copy.
        (process_reg_shuffles, add_insn_allocno_copies): Pass a new
        parameter to process_regs_for_copy.
        (propagate_copies): Pass a new parameter to ira_add_allocno_copy.
        Fix typo in passing second allocno to ira_add_allocno_copy.

        * ira-color.c (update_conflict_hard_regno_costs): Use head of
        coalesced allocnos list.
        (assign_hard_reg): Ditto.  Check that assigned allocnos are not in
        the graph.
        (add_ira_allocno_to_bucket): Rename to add_allocno_to_bucket.
        (add_ira_allocno_to_ordered_bucket): Rename to
        add_allocno_to_ordered_bucket.
        (push_ira_allocno_to_stack): Rename to push_allocno_to_stack.  Use
        head of coalesced allocnos list.
        (push_allocnos_to_stack): Remove calculation of ALLOCNO_TEMP.
        Check that it is aready calculated.
        (push_ira_allocno_to_spill): Rename to push_ira_allocno_to_spill.
        (setup_allocno_left_conflicts_num): Use head of coalesced allocnos
        list.
        (coalesce_allocnos): Do extended coalescing too.

        * ira-emit.c (add_range_and_copies_from_move_list): Pass a new
        parameter to ira_add_allocno_copy.

        * ira-build.c (ira_create_copy, ira_add_allocno_copy): Add a new
        parameter.
        (print_copy): Print copy origination too.

        * ira-costs.c (scan_one_insn): Use alloc_pref for load from
        equivalent memory.

Modified:
    branches/ira-merge/gcc/ChangeLog.ira
    branches/ira-merge/gcc/ira-build.c
    branches/ira-merge/gcc/ira-color.c
    branches/ira-merge/gcc/ira-conflicts.c
    branches/ira-merge/gcc/ira-costs.c
    branches/ira-merge/gcc/ira-emit.c
    branches/ira-merge/gcc/ira-int.h


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (10 preceding siblings ...)
  2008-11-11  0:02 ` hjl at gcc dot gnu dot org
@ 2008-12-06 22:07 ` steven at gcc dot gnu dot org
  2008-12-10  3:03 ` Joey dot ye at intel dot com
  2008-12-10  5:04 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-12-06 22:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from steven at gcc dot gnu dot org  2008-12-06 22:05 -------
What's the status of this bug? Fixed?


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (11 preceding siblings ...)
  2008-12-06 22:07 ` steven at gcc dot gnu dot org
@ 2008-12-10  3:03 ` Joey dot ye at intel dot com
  2008-12-10  5:04 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: Joey dot ye at intel dot com @ 2008-12-10  3:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from Joey dot ye at intel dot com  2008-12-10 03:01 -------
Fixed at trunk 142631


-- 


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


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

* [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code
  2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
                   ` (12 preceding siblings ...)
  2008-12-10  3:03 ` Joey dot ye at intel dot com
@ 2008-12-10  5:04 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-10  5:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hjl dot tools at gmail dot com  2008-12-10 05:02 -------
Fixed.


-- 

hjl dot tools at gmail dot com changed:

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


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


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

end of thread, other threads:[~2008-12-10  5:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29  5:39 [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2 hjl dot tools at gmail dot com
2008-10-29  5:46 ` [Bug rtl-optimization/37948] " hjl dot tools at gmail dot com
2008-10-29  7:18 ` bonzini at gnu dot org
2008-10-29  7:25   ` Andrew Thomas Pinski
2008-10-29  7:26 ` pinskia at gmail dot com
2008-10-29 13:08 ` hjl dot tools at gmail dot com
2008-10-29 14:50 ` rguenth at gcc dot gnu dot org
2008-10-30 21:08 ` rguenth at gcc dot gnu dot org
2008-10-30 22:53 ` hjl dot tools at gmail dot com
2008-11-04 19:37 ` [Bug rtl-optimization/37948] [4.4 Regression] IRA generates slower code hjl dot tools at gmail dot com
2008-11-10 16:13 ` vmakarov at redhat dot com
2008-11-10 23:24 ` vmakarov at gcc dot gnu dot org
2008-11-11  0:02 ` hjl at gcc dot gnu dot org
2008-12-06 22:07 ` steven at gcc dot gnu dot org
2008-12-10  3:03 ` Joey dot ye at intel dot com
2008-12-10  5:04 ` hjl dot tools at gmail dot com

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