public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bonzini at gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/26854] Inordinate compile times on large routines
Date: Sat, 04 Jul 2015 09:59:00 -0000	[thread overview]
Message-ID: <bug-26854-4-mGKLe8me3E@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-26854-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26854

--- Comment #130 from Paolo Bonzini <bonzini at gnu dot org> ---
A late update...

all.i: with GCC 4.8.3 on a Xeon E5 v3 time is taken mostly by alias stmt
walking

 alias stmt walking      : 272.52 (65%)  (-O2)
 alias stmt walking      : 116.06 (67%)  (-O1)

Requred memory is 700 MB.

With GCC 5.1, but on a Core i7 Ivy Bridge laptop so times are not comparable,
time is also taken mostly by alias stmt walking:

 alias stmt walking      : 604.43 (54%) usr (-O1)

and memory usage is also around 700 MB.

Brad was using -fschedule-insns too, and it's pretty expensive:

 scheduling              : 430.61 (38%)    (-O1 -fschedule-insns, 5.1)
 scheduling              : 122.68 (41%)    (-O1 -fschedule-insns, 4.8.3)

It also brings the top memory usage to 1 GB.

---------------------

compile.i:

with GCC 4.8.3 time is taken mostly by scheduling and some tree passes (-O1):

 alias stmt walking      : 206.77 (36%)
 tree CFG cleanup        :  42.66 ( 7%) usr   0.02 ( 0%) sys  42.65 ( 7%) wall 
  1108 kB ( 0%) ggc
 dominator optimization  :  39.98 ( 7%) usr   0.04 ( 1%) sys  39.97 ( 7%) wall 
 23123 kB ( 3%) ggc

Required memory is around 1 GB.  I haven't tested 5.1 but the alias stmt
walking seems to be a common feature of the Gambit testcases.

In both cases, memory usage is at least under control.  However, total compile
time has regressed since the previous report in comment 115.  As expected
walk_aliased_vdefs has a high % of time spent, but the time is spent in bitmap
operations rather than the callbacks!

This is because the callback is the trivial mark_modified function.  The guilty
walk_aliased_vdefs invocation is parm_ref_data_preserved_p, invoked from
ipa_load_from_parm_agg and in turn from unmodified_parm_or_parm_agg_item. 
Memoization via parms_ainfo seems like a plan, I'm opening a separate bug.


  parent reply	other threads:[~2015-07-04  9:59 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-26854-4@http.gcc.gnu.org/bugzilla/>
2011-01-18 14:42 ` rguenth at gcc dot gnu.org
2011-01-18 15:08 ` hubicka at gcc dot gnu.org
2011-01-18 15:15 ` dberlin at gcc dot gnu.org
2011-01-18 15:51 ` hubicka at ucw dot cz
2011-01-18 15:53 ` dberlin at gcc dot gnu.org
2011-01-24 23:03 ` jsm28 at gcc dot gnu.org
2011-01-24 23:47 ` ian at airs dot com
2011-02-02 17:54 ` dnovillo at gcc dot gnu.org
2015-07-04  9:59 ` bonzini at gnu dot org [this message]
2021-12-17  7:40 ` pinskia at gcc dot gnu.org
2021-12-17 20:21 ` lucier at math dot purdue.edu
2021-12-17 20:24 ` lucier at math dot purdue.edu
2022-01-03 10:48 ` rguenth at gcc dot gnu.org
2023-02-06 12:14 ` rguenth at gcc dot gnu.org
2023-02-07 13:39 ` cvs-commit at gcc dot gnu.org
2023-02-07 22:23 ` lucier at math dot purdue.edu
2023-02-08 21:53 ` lucier at math dot purdue.edu
2023-02-09  7:24 ` cvs-commit at gcc dot gnu.org
2023-02-09  7:54 ` rguenth at gcc dot gnu.org
2023-02-09  8:47 ` rguenth at gcc dot gnu.org
2023-02-13 14:55 ` rguenth at gcc dot gnu.org
2023-02-15 14:05 ` cvs-commit at gcc dot gnu.org
2006-03-24 20:25 [Bug c/26854] New: " lucier at math dot purdue dot edu
2006-03-25 16:21 ` [Bug tree-optimization/26854] " rguenth at gcc dot gnu dot org
2006-03-25 22:22 ` lucier at math dot purdue dot edu
2006-04-19  6:43 ` law at redhat dot com
2006-04-19 15:32 ` law at redhat dot com
2006-04-19 22:34 ` law at gcc dot gnu dot org
2006-04-20  3:18 ` lucier at math dot purdue dot edu
2006-04-20  3:28 ` law at redhat dot com
2006-04-20  3:39 ` lucier at math dot purdue dot edu
2006-04-20 16:13 ` law at gcc dot gnu dot org
2006-04-20 16:17 ` law at redhat dot com
2006-04-20 16:21 ` dberlin at gcc dot gnu dot org
2006-04-26 18:59 ` amacleod at redhat dot com
2006-04-27  2:29 ` amacleod at redhat dot com
2006-04-27  2:30 ` amacleod at redhat dot com
2006-04-27 20:22 ` amacleod at gcc dot gnu dot org
2006-11-30  4:36 ` lucier at math dot purdue dot edu
2006-11-30  4:54 ` dberlin at dberlin dot org
2006-12-07 17:33 ` lucier at math dot purdue dot edu
2006-12-07 17:54 ` dberlin at dberlin dot org
2006-12-07 17:54 ` dberlin at dberlin dot org
2006-12-07 21:51 ` lucier at math dot purdue dot edu
2006-12-08  1:24 ` lucier at math dot purdue dot edu
2006-12-11  6:28 ` lucier at math dot purdue dot edu
2007-01-10 18:49 ` lucier at math dot purdue dot edu
2007-01-10 19:48 ` amacleod at redhat dot com
2007-11-14  9:56 ` steven at gcc dot gnu dot org
2007-11-14 10:07 ` rguenth at gcc dot gnu dot org
2007-11-14 12:04 ` steven at gcc dot gnu dot org
2007-11-14 12:40 ` lucier at math dot purdue dot edu
2007-11-14 13:14 ` rguenth at gcc dot gnu dot org
2007-11-14 13:38 ` lucier at math dot purdue dot edu
2007-11-14 14:08 ` rguenth at gcc dot gnu dot org
2007-11-14 16:57 ` dberlin at dberlin dot org
2007-11-14 19:05 ` lucier at math dot purdue dot edu
2007-11-14 19:06 ` lucier at math dot purdue dot edu
2007-12-19 21:49 ` lucier at math dot purdue dot edu
2007-12-19 22:13 ` steven at gcc dot gnu dot org
2007-12-19 23:31 ` lucier at math dot purdue dot edu
2007-12-20  0:02 ` steven at gcc dot gnu dot org
2007-12-20  2:29 ` lucier at math dot purdue dot edu
2007-12-20  3:07 ` zadeck at naturalbridge dot com
2007-12-20  3:52 ` lucier at math dot purdue dot edu
2007-12-20 14:49 ` zadeck at naturalbridge dot com
2007-12-20 15:08 ` stevenb dot gcc at gmail dot com
2007-12-20 15:31 ` zadeck at naturalbridge dot com
2007-12-20 16:06 ` zadeck at naturalbridge dot com
2007-12-20 16:11 ` lucier at math dot purdue dot edu
2007-12-20 17:28 ` zadeck at naturalbridge dot com
2007-12-20 18:56 ` lucier at math dot purdue dot edu
2008-01-17 21:41 ` zadeck at naturalbridge dot com
2008-01-17 21:55 ` rguenth at gcc dot gnu dot org
2008-01-17 22:07 ` zadeck at naturalbridge dot com
2008-01-17 22:20 ` lucier at math dot purdue dot edu
2008-01-17 22:54 ` lucier at math dot purdue dot edu
2008-01-17 23:58 ` zadeck at naturalbridge dot com
2008-01-18  1:46 ` lucier at math dot purdue dot edu
2008-01-18  2:18 ` zadeck at naturalbridge dot com
2008-01-19  0:51 ` zadeck at gcc dot gnu dot org
2008-01-20  2:21 ` zadeck at gcc dot gnu dot org
2008-01-22 13:59 ` zadeck at gcc dot gnu dot org
2008-01-23 15:45 ` lucier at math dot purdue dot edu
2008-05-15  2:49 ` lucier at math dot purdue dot edu
2008-05-15  2:51 ` lucier at math dot purdue dot edu
2008-05-15  2:52 ` lucier at math dot purdue dot edu
2008-05-15  5:59 ` steven at gcc dot gnu dot org
2008-05-19  2:00 ` vmakarov at redhat dot com
2008-05-19  2:04 ` vmakarov at gcc dot gnu dot org
2008-05-19  2:09 ` vmakarov at redhat dot com
2008-05-19 17:55 ` lucier at math dot purdue dot edu
2008-07-10 17:37 ` lucier at math dot purdue dot edu
2008-07-10 17:45 ` lucier at math dot purdue dot edu
2008-07-10 19:38 ` rguenth at gcc dot gnu dot org
2008-07-10 19:40 ` zadeck at naturalbridge dot com
2008-09-10 13:40 ` lucier at math dot purdue dot edu

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=bug-26854-4-mGKLe8me3E@http.gcc.gnu.org/bugzilla/ \
    --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).