public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/14703] [4.4 regression] Inadequate optimization of inline templated functions, infinite loop in ipa-reference and memory hog
Date: Sat, 06 Sep 2008 12:57:00 -0000	[thread overview]
Message-ID: <20080906125626.15601.qmail@sourceware.org> (raw)
In-Reply-To: <bug-14703-3016@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from hubicka at gcc dot gnu dot org  2008-09-06 12:56 -------
cp/lex.c:590 (copy_decl)                              10176: 0.0%          0:
0.0%     578168: 0.0%      66200: 0.0%       2257
cp/lex.c:510 (build_lang_decl)                       161064: 0.1%      73304:
0.0%     928504: 0.0%     103928: 0.1%       4891
ggc-common.c:187 (ggc_calloc)                     128717192:50.5%       9936:
0.0%   84083632: 3.5%      11048: 0.0%        651
tree-dfa.c:150 (create_var_ann)                           0: 0.0% 
383385552:98.7%  212651472: 8.9%   54185184:28.3%    6773148
tree-inline.c:484 (remap_block)                   117369096:46.1%          0:
0.0%  939210480:39.4%   81275352:42.5%   10159419
tree-inline.c:4088 (copy_decl_no_change)              36328: 0.0%          0:
0.0% 1137856064:47.7%   54184584:28.3%    6773199

This patch solves it:
Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c     (revision 139985)
+++ tree-ssa-live.c     (working copy)
@@ -489,6 +489,13 @@ remove_unused_scope_block_p (tree scope)
       if (TREE_CODE (*t) == FUNCTION_DECL)
        unused = false;

+      /* Remove everything we don't generate debug info for.  */
+      else if (DECL_IGNORED_P (*t))
+       {
+         *t = TREE_CHAIN (*t);
+         next = t;
+       }
+
       /* When we are outputting debug info, we usually want to output
         info about optimized-out variables in the scope blocks.
         Exception are the scope blocks not containing any instructions

The combined patch masks ipa-reference issue, but it needs to be solved too.


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-09-06 12:37:51         |2008-09-06 12:56:26
               date|                            |


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


  parent reply	other threads:[~2008-09-06 12:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-14703-3016@http.gcc.gnu.org/bugzilla/>
2006-03-02 20:25 ` [Bug tree-optimization/14703] Inadequate optimization of inline templated functions eric-gcc at omnifarious dot org
2006-03-03 10:29 ` rguenth at gcc dot gnu dot org
2008-09-06 12:39 ` [Bug tree-optimization/14703] [4.4 regression] Inadequate optimization of inline templated functions, infinite loop in ipa-reference and memory hog hubicka at gcc dot gnu dot org
2008-09-06 12:57 ` hubicka at gcc dot gnu dot org [this message]
2008-09-06 17:12 ` hubicka at gcc dot gnu dot org
2008-09-06 20:24 ` hubicka at gcc dot gnu dot org
2008-09-11  5:19 ` luisgpm at linux dot vnet dot ibm dot com
2008-09-12  8:34 ` hubicka at gcc dot gnu dot org
2008-09-12  8:40 ` hubicka at gcc dot gnu dot org
2008-09-19  6:23 ` hubicka at gcc dot gnu dot org
2008-11-01 11:52 ` [Bug tree-optimization/14703] " rguenth 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=20080906125626.15601.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).