public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37790]  New: limits-fnargs.c takes very long time to compile at -O2
@ 2008-10-09 22:29 sje at cup dot hp dot com
  2008-11-08  0:56 ` [Bug middle-end/37790] " danglin at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sje at cup dot hp dot com @ 2008-10-09 22:29 UTC (permalink / raw)
  To: gcc-bugs

The test case gcc-c-torture/compile/limits-fnargs.c takes multiple hours to
compile at -O2 or above optimization on IA64.  It looks like most of the time
is spent in IRA.  The IRA pass calls reload which calls
ira_sort_regnos_for_alter_reg with n = 28977.  This in turn calls
coalesce_spill_slots with num = 10061.  It is in the main loop of
coalesce_spill_slots where I seem to spend a most of the time compiling
limits-fnargs.c.


-- 
           Summary: limits-fnargs.c takes very long time to compile at -O2
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sje at cup dot hp dot com
GCC target triplet: ia64-*-*


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
@ 2008-11-08  0:56 ` danglin at gcc dot gnu dot org
  2008-11-16 16:16 ` vmakarov at redhat dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-08  0:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2008-11-08 00:55 -------
The same problem is present on hppa64.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu dot
                   |                            |org


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
  2008-11-08  0:56 ` [Bug middle-end/37790] " danglin at gcc dot gnu dot org
@ 2008-11-16 16:16 ` vmakarov at redhat dot com
  2008-11-16 19:50 ` hjl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vmakarov at redhat dot com @ 2008-11-16 16:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from vmakarov at redhat dot com  2008-11-16 16:14 -------
  I waited more than hour to compile it on 1.2Ghz itanium and canceled the
compilation.  The problem is in coalescing stack slots.  The code was already
rewritten for

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

  But it is not enough for limit-fnargs.c which has more 100K allocnos and
practically the same number of final stack slots.

  So I rewrote it one more time.  The compilation time was decreased to decent
120 sec and PR37448 has still practically the same compilation time as the
current version of the code.

  I'll sent the patch today for approval.



-- 


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
  2008-11-08  0:56 ` [Bug middle-end/37790] " danglin at gcc dot gnu dot org
  2008-11-16 16:16 ` vmakarov at redhat dot com
@ 2008-11-16 19:50 ` hjl at gcc dot gnu dot org
  2008-11-19 21:23 ` vmakarov at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-11-16 19:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl at gcc dot gnu dot org  2008-11-16 19:49 -------
Subject: Bug 37790

Author: hjl
Date: Sun Nov 16 19:47:40 2008
New Revision: 141924

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

        PR bootstrap/37790
        * ira-int.h (ira_copy_allocno_live_range_list,
        ira_merge_allocno_live_ranges,
        ira_allocno_live_ranges_intersect_p,
        ira_finish_allocno_live_range_list): New prototypes.
        (ira_allocno_live_ranges_intersect_p,
        ira_pseudo_live_ranges_intersect_p): Remove.

        * ira-conflicts.c (ira_allocno_live_ranges_intersect_p,
        ira_pseudo_live_ranges_intersect_p): Rename to
        allocnos_have_intersected_live_ranges_p and
        pseudos_have_intersected_live_ranges_p.  Move them from here to
        ...

        * ira-color.c: ... here
        (coalesced_allocno_conflict_p): Use
        allocnos_have_intersected_live_ranges_p.
        (coalesced_allocnos_living_at_program_points,
        coalesced_allocnos_live_at_points_p,
        set_coalesced_allocnos_live_points): Remove.
        (slot_coalesced_allocnos_live_ranges,
        slot_coalesced_allocno_live_ranges_intersect_p,
        setup_slot_coalesced_allocno_live_ranges): New.
        (coalesce_spill_slots): Use ranges of coalesced allocnos.
        (ira_sort_regnos_for_alter_reg): Use
        allocnos_have_intersected_live_ranges_p.
        (ira_reuse_stack_slot): Use
        pseudos_have_intersected_live_ranges_p.

        * global.c (pseudo_for_reload_consideration_p): Check
        flag_ira_share_spill_slots too.

        * ira-build.c (copy_allocno_live_range_list): Rename to
        ira_copy_allocno_live_range_list.  Make it external.
        (merge_ranges): Rename to ira_merge_allocno_live_ranges.  Make it
        external.
        (ira_allocno_live_ranges_intersect_p): New.
        (ira_finish_allocno_live_range_list): New.
        (finish_allocno): Use it.
        (remove_unnecessary_allocnos): Use ira_merge_allocno_live_ranges.
        (copy_info_to_removed_store_destinations): Ditto.  Use
        ira_copy_allocno_live_range_list.
        (ira_flattening): Use ira_merge_allocno_live_ranges.

        * ira.c (too_high_register_pressure_p): New function.
        (ira): Switch off sharing spill slots if the pressure is too high.

Modified:
    branches/ira-merge/gcc/ChangeLog.ira
    branches/ira-merge/gcc/global.c
    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-int.h
    branches/ira-merge/gcc/ira.c


-- 


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
                   ` (2 preceding siblings ...)
  2008-11-16 19:50 ` hjl at gcc dot gnu dot org
@ 2008-11-19 21:23 ` vmakarov at gcc dot gnu dot org
  2008-11-20 18:31 ` sje at cup dot hp dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2008-11-19 21:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from vmakarov at gcc dot gnu dot org  2008-11-19 21:22 -------
Subject: Bug 37790

Author: vmakarov
Date: Wed Nov 19 21:20:44 2008
New Revision: 142017

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

        PR bootstrap/37790
        * ira-int.h (ira_copy_allocno_live_range_list,
        ira_merge_allocno_live_ranges,
        ira_allocno_live_ranges_intersect_p,
        ira_finish_allocno_live_range_list): New prototypes.
        (ira_allocno_live_ranges_intersect_p,
        ira_pseudo_live_ranges_intersect_p): Remove.

        * ira-conflicts.c (ira_allocno_live_ranges_intersect_p,
        ira_pseudo_live_ranges_intersect_p): Rename to
        allocnos_have_intersected_live_ranges_p and
        pseudos_have_intersected_live_ranges_p.  Move them from here to
        ...

        * ira-color.c: ... here
        (coalesced_allocno_conflict_p): Use
        allocnos_have_intersected_live_ranges_p.
        (coalesced_allocnos_living_at_program_points,
        coalesced_allocnos_live_at_points_p,
        set_coalesced_allocnos_live_points): Remove.
        (slot_coalesced_allocnos_live_ranges,
        slot_coalesced_allocno_live_ranges_intersect_p,
        setup_slot_coalesced_allocno_live_ranges): New.
        (coalesce_spill_slots): Use ranges of coalesced allocnos.
        (ira_sort_regnos_for_alter_reg): Use
        allocnos_have_intersected_live_ranges_p.
        (ira_reuse_stack_slot): Use
        pseudos_have_intersected_live_ranges_p.

        * global.c (pseudo_for_reload_consideration_p): Check
        flag_ira_share_spill_slots too.

        * ira-build.c (copy_allocno_live_range_list): Rename to
        ira_copy_allocno_live_range_list.  Make it external.
        (merge_ranges): Rename to ira_merge_allocno_live_ranges.  Make it
        external.
        (ira_allocno_live_ranges_intersect_p): New.
        (ira_finish_allocno_live_range_list): New.
        (finish_allocno): Use it.
        (remove_unnecessary_allocnos): Use ira_merge_allocno_live_ranges.
        (copy_info_to_removed_store_destinations): Ditto.  Use
        ira_copy_allocno_live_range_list.
        (ira_flattening): Use ira_merge_allocno_live_ranges.

        * ira.c (too_high_register_pressure_p): New function.
        (ira): Switch off sharing spill slots if the pressure is too high.


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


-- 


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
                   ` (3 preceding siblings ...)
  2008-11-19 21:23 ` vmakarov at gcc dot gnu dot org
@ 2008-11-20 18:31 ` sje at cup dot hp dot com
  2008-11-20 19:00 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-11-20 19:07 ` sje at cup dot hp dot com
  6 siblings, 0 replies; 8+ messages in thread
From: sje at cup dot hp dot com @ 2008-11-20 18:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sje at cup dot hp dot com  2008-11-20 18:30 -------
The limits-fnargs.c tests pass on my IA64 platforms (HP-UX and Linux).  It
still failed on hppa64-*-hpux* with a timeout but my PA box is quite slow and I
have other tests timing out there as well.  I am willing to call it fixed
unless Dave wants to keep it open for the hppa64 platform.


-- 


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
                   ` (4 preceding siblings ...)
  2008-11-20 18:31 ` sje at cup dot hp dot com
@ 2008-11-20 19:00 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-11-20 19:07 ` sje at cup dot hp dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-11-20 19:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2008-11-20 18:59 -------
Subject: Re:  limits-fnargs.c takes very long time to compile at -O2

> ------- Comment #5 from sje at cup dot hp dot com  2008-11-20 18:30 -------
> The limits-fnargs.c tests pass on my IA64 platforms (HP-UX and Linux).  It
> still failed on hppa64-*-hpux* with a timeout but my PA box is quite slow and I
> have other tests timing out there as well.  I am willing to call it fixed
> unless Dave wants to keep it open for the hppa64 platform.

It's no longer failing on my box, so I guess we can call it fixed.  I'm
sure things will get faster with checking off.

Still have:
WARNING: program timed out.
FAIL: gcc.dg/20020425-1.c (test for excess errors)

Dave


-- 


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


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

* [Bug middle-end/37790] limits-fnargs.c takes very long time to compile at -O2
  2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
                   ` (5 preceding siblings ...)
  2008-11-20 19:00 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-11-20 19:07 ` sje at cup dot hp dot com
  6 siblings, 0 replies; 8+ messages in thread
From: sje at cup dot hp dot com @ 2008-11-20 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from sje at cup dot hp dot com  2008-11-20 19:05 -------
gcc.dg/20020425-1.c is a separate issue where the 'remove useless statements'
pass is very slow.  I will add some comments to that bug report soon if I can't
come up with a fix.

Resolving this report as fixed.


-- 

sje at cup dot hp dot com changed:

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


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


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

end of thread, other threads:[~2008-11-20 19:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-09 22:29 [Bug middle-end/37790] New: limits-fnargs.c takes very long time to compile at -O2 sje at cup dot hp dot com
2008-11-08  0:56 ` [Bug middle-end/37790] " danglin at gcc dot gnu dot org
2008-11-16 16:16 ` vmakarov at redhat dot com
2008-11-16 19:50 ` hjl at gcc dot gnu dot org
2008-11-19 21:23 ` vmakarov at gcc dot gnu dot org
2008-11-20 18:31 ` sje at cup dot hp dot com
2008-11-20 19:00 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-20 19:07 ` sje at cup dot hp 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).