This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37448] [4.3/4.4/4.5 Regression] gcc 4.3.1 cannot compile big function
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 16:50:25 -0000
- Subject: [Bug middle-end/37448] [4.3/4.4/4.5 Regression] gcc 4.3.1 cannot compile big function
- References: <bug-37448-16683@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #37 from rguenth at gcc dot gnu dot org 2010-01-28 16:50 -------
But it miscompares. Honza?!
Index: gcc/ipa-inline.c
===================================================================
*** gcc/ipa-inline.c (revision 156321)
--- gcc/ipa-inline.c (working copy)
*************** cgraph_decide_inlining_incrementally (st
*** 1510,1515 ****
--- 1510,1517 ----
/* Never inline regular functions into always-inline functions
during incremental inlining. */
&& !node->local.disregard_inline_limits)
+ {
+ bitmap visited = BITMAP_ALLOC (NULL);
for (e = node->callees; e; e = e->next_callee)
{
int allowed_growth = 0;
*************** cgraph_decide_inlining_incrementally (st
*** 1517,1522 ****
--- 1519,1528 ----
|| !e->inline_failed
|| e->callee->local.disregard_inline_limits)
continue;
+ /* We are inlining a function to all call-sites in node
+ or to none. So visit each candidate only once. */
+ if (!bitmap_set_bit (visited, e->callee->uid))
+ continue;
if (dump_file)
fprintf (dump_file, "Considering inline candidate %s.\n",
cgraph_node_name (e->callee));
*************** cgraph_decide_inlining_incrementally (st
*** 1601,1606 ****
--- 1607,1614 ----
if (cgraph_default_inline_p (e->callee, &failed_reason))
inlined |= try_inline (e, mode, depth);
}
+ BITMAP_FREE (visited);
+ }
node->aux = (void *)(size_t) old_mode;
return inlined;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37448