http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49997
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-06 14:06:29 UTC --- Hmm, the problem is that with inline predicates the overall growth depends not only on number of calls, but also at information known about call site. This information could potentially change every time function containing the call site gets inlined. This breaks the optimization avoiding update in inline_small_functions. The following hack fixes the problem, but the test was added to avoid really bad quadratic behaviour when compiling cc1 with LTO. I will need to benchmark it and probably add parameter limitting key updating for single inline action. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 178592) +++ ipa-inline.c (working copy) @@ -1514,7 +1515,7 @@ inline_small_functions (void) /* We inlined last offline copy to the body. This might lead to callees of function having fewer call sites and thus they may need updating. */ - if (callee->global.inlined_to) + if (callee->global.inlined_to || 1) update_all_callee_keys (heap, callee, updated_nodes); else update_callee_keys (heap, edge->callee, updated_nodes);