public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/28071] [4.1/4.2 regression] A file that can not be compiled in reasonable time/space Date: Sat, 22 Jul 2006 13:47:00 -0000 [thread overview] Message-ID: <20060722134743.11873.qmail@sourceware.org> (raw) In-Reply-To: <bug-28071-12846@http.gcc.gnu.org/bugzilla/> ------- Comment #10 from hubicka at ucw dot cz 2006-07-22 13:47 ------- Subject: Re: [4.1/4.2 regression] A file that can not be compiled in reasonable time/space Hi, this patch makes the -O2 case work pretty well on tree side. Inliner expands code from 8MB to 40MB of GGC memory that seems under control. Aliasing peaks at 85MB that also don't seem completely unresonable. I will need to give it more testing. I believe inliner is always ggc safe but it is easy to be mistaken here. The patch also speeds up the inline heuristic by prunning out the impossible edges early making the priority queue smaller. Also I am quite curious how inliner manages to produce 800MB of garbage... Honza Index: ipa-inline.c =================================================================== *** ipa-inline.c (revision 115645) --- ipa-inline.c (working copy) *************** update_caller_keys (fibheap_t heap, stru *** 413,418 **** --- 413,419 ---- bitmap updated_nodes) { struct cgraph_edge *edge; + const char *failed_reason; if (!node->local.inlinable || node->local.disregard_inline_limits || node->global.inlined_to) *************** update_caller_keys (fibheap_t heap, stru *** 421,426 **** --- 422,441 ---- return; bitmap_set_bit (updated_nodes, node->uid); node->global.estimated_growth = INT_MIN; + + if (!node->local.inlinable) + return; + /* Prune out edges we won't inline into anymore. */ + if (!cgraph_default_inline_p (node, &failed_reason)) + { + for (edge = node->callers; edge; edge = edge->next_caller) + if (edge->aux) + { + fibheap_delete_node (heap, edge->aux); + edge->aux = NULL; + } + return; + } for (edge = node->callers; edge; edge = edge->next_caller) if (edge->inline_failed) Index: tree-inline.c =================================================================== *** tree-inline.c (revision 115645) --- tree-inline.c (working copy) *************** expand_call_inline (basic_block bb, tree *** 2163,2172 **** /* Update callgraph if needed. */ cgraph_remove_node (cg_edge->callee); - /* Declare the 'auto' variables added with this inlined body. */ - record_vars (BLOCK_VARS (id->block)); id->block = NULL_TREE; successfully_inlined = TRUE; egress: input_location = saved_location; --- 2163,2171 ---- /* Update callgraph if needed. */ cgraph_remove_node (cg_edge->callee); id->block = NULL_TREE; successfully_inlined = TRUE; + ggc_collect (); egress: input_location = saved_location; *************** declare_inline_vars (tree block, tree va *** 2556,2562 **** { tree t; for (t = vars; t; t = TREE_CHAIN (t)) ! DECL_SEEN_IN_BIND_EXPR_P (t) = 1; if (block) BLOCK_VARS (block) = chainon (BLOCK_VARS (block), vars); --- 2555,2567 ---- { tree t; for (t = vars; t; t = TREE_CHAIN (t)) ! { ! DECL_SEEN_IN_BIND_EXPR_P (t) = 1; ! gcc_assert (!TREE_STATIC (t) && !TREE_ASM_WRITTEN (t)); ! cfun->unexpanded_var_list = ! tree_cons (NULL_TREE, t, ! cfun->unexpanded_var_list); ! } if (block) BLOCK_VARS (block) = chainon (BLOCK_VARS (block), vars); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28071
next prev parent reply other threads:[~2006-07-22 13:47 UTC|newest] Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-06-17 9:27 [Bug c/28071] New: " raffalli at univ-savoie dot fr 2006-06-17 9:52 ` [Bug c/28071] " raffalli at univ-savoie dot fr 2006-06-17 10:57 ` steven at gcc dot gnu dot org 2006-06-17 11:06 ` steven at gcc dot gnu dot org 2006-06-17 14:30 ` steven at gcc dot gnu dot org 2006-06-17 14:56 ` [Bug middle-end/28071] [4.2 regression] " pinskia at gcc dot gnu dot org 2006-06-17 18:42 ` [Bug middle-end/28071] [4.1/4.2 " rguenth at gcc dot gnu dot org 2006-06-17 19:24 ` [Bug rtl-optimization/28071] " rguenth at gcc dot gnu dot org 2006-06-19 8:56 ` raffalli at univ-savoie dot fr 2006-07-17 2:45 ` mmitchel at gcc dot gnu dot org 2006-07-21 21:12 ` hubicka at gcc dot gnu dot org 2006-07-21 22:01 ` raffalli at univ-savoie dot fr 2006-07-22 13:47 ` hubicka at ucw dot cz [this message] 2006-07-22 17:13 ` hubicka at ucw dot cz 2006-07-22 18:09 ` hubicka at ucw dot cz 2006-07-22 19:30 ` hubicka at ucw dot cz 2006-07-22 20:51 ` Jan Hubicka 2006-07-22 20:51 ` hubicka at ucw dot cz 2006-07-24 0:05 ` patchapp at dberlin dot org 2006-07-24 11:24 ` hubicka at gcc dot gnu dot org 2006-07-24 11:28 ` hubicka at gcc dot gnu dot org 2006-07-24 11:54 ` hubicka at gcc dot gnu dot org 2006-07-25 18:20 ` patchapp at dberlin dot org 2006-07-26 22:52 ` hubicka at gcc dot gnu dot org 2006-07-27 7:15 ` patchapp at dberlin dot org 2006-07-27 7:20 ` patchapp at dberlin dot org 2006-07-27 7:25 ` patchapp at dberlin dot org 2006-07-27 8:00 ` patchapp at dberlin dot org 2006-07-27 16:02 ` hubicka at gcc dot gnu dot org 2006-07-27 16:03 ` hubicka at gcc dot gnu dot org 2006-07-27 17:10 ` hubicka at gcc dot gnu dot org 2006-07-28 9:30 ` patchapp at dberlin dot org 2006-07-28 9:41 ` hubicka at ucw dot cz 2006-07-29 13:15 ` hubicka at gcc dot gnu dot org 2006-07-30 5:45 ` patchapp at dberlin dot org 2006-08-11 7:17 ` ebotcazou at gcc dot gnu dot org 2006-08-16 21:25 ` [Bug middle-end/28071] " rakdver at gcc dot gnu dot org 2006-08-18 23:10 ` hubicka at ucw dot cz 2006-08-19 0:19 ` hubicka at ucw dot cz 2006-08-19 1:52 ` hubicka at ucw dot cz 2006-08-19 21:58 ` amacleod at redhat dot com 2006-08-20 0:58 ` Jan Hubicka 2006-08-20 0:59 ` hubicka at ucw dot cz 2006-08-21 0:00 ` hubicka at gcc dot gnu dot org 2006-08-21 1:42 ` hubicka at gcc dot gnu dot org 2006-08-21 2:59 ` Jan Hubicka 2006-08-21 2:59 ` hubicka at ucw dot cz 2006-08-21 12:56 ` hubicka at ucw dot cz 2006-08-21 17:11 ` hubicka at ucw dot cz 2006-08-25 1:37 ` amacleod at redhat dot com 2006-08-25 1:43 ` amacleod at redhat dot com 2006-08-25 1:57 ` amacleod at redhat dot com 2006-08-28 17:18 ` amacleod at gcc dot gnu dot org 2006-08-28 17:37 ` amacleod at redhat dot com 2006-09-12 10:11 ` hubicka at gcc dot gnu dot org 2006-09-23 9:44 ` steven at gcc dot gnu dot org 2006-09-23 10:22 ` [Bug middle-end/28071] [4.1 " rguenth at gcc dot gnu dot org 2007-01-10 11:43 ` mkuvyrkov at gcc dot gnu dot org 2007-01-15 7:19 ` zaks at il dot ibm dot com 2007-01-15 7:52 ` Maxim Kuvyrkov 2007-01-15 7:53 ` mkuvyrkov at ispras dot ru 2007-01-15 15:31 ` zaks at il dot ibm dot com 2007-01-18 9:52 ` hubicka at ucw dot cz 2007-02-06 22:05 ` hubicka at gcc dot gnu dot org 2007-02-06 22:15 ` hubicka at gcc dot gnu dot org 2007-03-26 15:50 ` bonzini at gnu dot org 2007-04-16 15:04 ` mkuvyrkov at gcc dot gnu dot org 2007-04-16 15:07 ` mkuvyrkov at gcc dot gnu dot org 2007-04-17 18:16 ` hubicka at gcc dot gnu dot org 2007-04-17 18:38 ` hubicka at ucw dot cz 2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org 2007-05-14 21:49 ` fang at csl dot cornell dot edu 2007-07-20 3:47 ` mmitchel at gcc dot gnu dot org 2007-10-09 19:25 ` mmitchel at gcc dot gnu dot org 2007-11-03 8:07 ` ebotcazou 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=20060722134743.11873.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: linkBe 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).