public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/38474] slow compilation at -O0 (callgraph optimization, inline heuristics, expand )
Date: Mon, 15 Dec 2008 21:29:00 -0000	[thread overview]
Message-ID: <20081215212740.28755.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38474-6642@http.gcc.gnu.org/bugzilla/>



------- Comment #13 from steven at gcc dot gnu dot org  2008-12-15 21:27 -------
OK, to elaborate: I'm playing with this test case on ia64-linux, and I reduced
the test case by some 8000 lines to make it compilable at all.  With this 8000
lines less, it actually spends more time for me in "expand", in the function
"find_temp_slot_from_address (rtx x)".  It spends all of its time...

  for (i = max_slot_level (); i >= 0; i--)
    for (p = *temp_slots_at_level (i); p; p = p->next)
      {
        if (XEXP (p->slot, 0) == x
            || p->address == x
            || (GET_CODE (x) == PLUS
                && XEXP (x, 0) == virtual_stack_vars_rtx
                && GET_CODE (XEXP (x, 1)) == CONST_INT
                && INTVAL (XEXP (x, 1)) >= p->base_offset
                && INTVAL (XEXP (x, 1)) < p->base_offset + p->full_size))
          return p;

        else if (p->address != 0 && GET_CODE (p->address) == EXPR_LIST)
          for (next = p->address; next; next = XEXP (next, 1))
            if (XEXP (next, 0) == x)  /* ...here in  this loop... */
              return p;

in the "for (next = p->address; ...)" loop. This list in p->address is actually
several thousand items long and it is traversed many times:

traversals ~ max_slot_level()*temp_slots_at_level(i)*list length of p->address

which is, at best, cubic behavior.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-12-10 15:39:38         |2008-12-15 21:27:40
               date|                            |


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


  parent reply	other threads:[~2008-12-15 21:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 15:26 [Bug middle-end/38474] New: slow compilation at -O0 (callgraph optimization, inline heuristics, ggc " jv244 at cam dot ac dot uk
2008-12-10 15:27 ` [Bug middle-end/38474] " jv244 at cam dot ac dot uk
2008-12-10 15:41 ` [Bug middle-end/38474] slow compilation at -O0 (callgraph optimization, inline heuristics, " rguenth at gcc dot gnu dot org
2008-12-10 16:14 ` jv244 at cam dot ac dot uk
2008-12-10 16:58 ` rguenth at gcc dot gnu dot org
2008-12-10 22:35 ` jv244 at cam dot ac dot uk
2008-12-10 22:49 ` rguenth at gcc dot gnu dot org
2008-12-10 22:58 ` jv244 at cam dot ac dot uk
2008-12-11  8:28 ` jv244 at cam dot ac dot uk
2008-12-11 11:35 ` rguenth at gcc dot gnu dot org
2008-12-11 12:04 ` jv244 at cam dot ac dot uk
2008-12-15 19:39 ` jv244 at cam dot ac dot uk
2008-12-15 21:19 ` steven at gcc dot gnu dot org
2008-12-15 21:29 ` steven at gcc dot gnu dot org [this message]
2008-12-15 21:54 ` steven at gcc dot gnu dot org
2008-12-15 21:56 ` steven at gcc dot gnu dot org
2008-12-15 21:57 ` steven at gcc dot gnu dot org
2008-12-16  7:52 ` jv244 at cam dot ac dot uk
2008-12-16 11:59 ` jv244 at cam dot ac dot uk
2008-12-16 12:46 ` steven at gcc dot gnu dot org
2008-12-16 12:48 ` jv244 at cam dot ac dot uk
2008-12-16 12:50 ` jv244 at cam dot ac dot uk
2008-12-16 13:43 ` steven at gcc dot gnu dot org
2008-12-16 14:19 ` jv244 at cam dot ac dot uk
2008-12-16 14:21 ` jv244 at cam dot ac dot uk
2008-12-16 16:19 ` jv244 at cam dot ac dot uk
2008-12-16 16:28 ` steven at gcc dot gnu dot org
2008-12-16 16:31 ` jv244 at cam dot ac dot uk
2008-12-16 19:35 ` [Bug middle-end/38474] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-12-16 20:32 ` jv244 at cam dot ac dot uk
2008-12-17  6:52 ` jv244 at cam dot ac dot uk
2008-12-17  7:03 ` steven at gcc dot gnu dot org
2008-12-17  8:37 ` jv244 at cam dot ac dot uk
2008-12-17 12:59 ` jv244 at cam dot ac dot uk
2008-12-17 19:42 ` steven at gcc dot gnu dot org
2008-12-20  9:00 ` jv244 at cam dot ac dot uk
2008-12-20  9:56 ` steven at gcc dot gnu dot org
2008-12-20 11:33 ` [Bug middle-end/38474] [Meta] " jv244 at cam dot ac dot uk
2008-12-20 15:51 ` steven at gcc dot gnu dot org
2009-01-24 10:27 ` rguenth at gcc dot gnu dot org
2009-08-04 12:45 ` rguenth at gcc dot gnu dot org
2009-11-27  8:52 ` jv244 at cam dot ac dot uk
2009-11-27  9:00 ` jv244 at cam dot ac dot uk
2009-11-27 10:50 ` rguenth at gcc dot gnu dot org
2009-12-03 13:37 ` matz at gcc dot gnu dot org
2009-12-03 17:48 ` jv244 at cam dot ac dot uk
2009-12-03 21:05 ` matz at gcc dot gnu dot org
2009-12-08 13:56 ` matz at gcc dot gnu dot org
2010-05-22 18:33 ` rguenth at gcc dot gnu dot org
2010-05-23  6:31 ` jv244 at cam dot ac dot uk
2010-05-23 20:09 ` rguenth at gcc dot gnu dot org
2010-05-23 21:03 ` [Bug middle-end/38474] slow compilation at -O0 due to expand's temp slot goo steven at gcc dot gnu dot org

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=20081215212740.28755.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).