------- Comment #3 from rguenth at gcc dot gnu dot org 2010-02-13 19:25 ------- limit += limit * PARAM_VALUE (PARAM_LARGE_FUNCTION_GROWTH) / 100;
/* Check the size after inlining against the function limits. But allow the function to shrink if it went over the limits by forced inlining. */ newsize = cgraph_estimate_size_after_inlining (times, to, what); if (newsize >= to->global.size && newsize > PARAM_VALUE (PARAM_LARGE_FUNCTION_INSNS) && newsize > limit) { this allows unbounded growth based on PARAM_LARGE_FUNCTION_GROWTH, ignoring PARAM_LARGE_FUNCTION_INSNS. Shouldn't we at least limit /* When inlining large function body called once into small function, take the inlined function as base for limiting the growth. */ if (inline_summary (to)->self_size > inline_summary(what)->self_size) limit = inline_summary (to)->self_size; else limit = inline_summary (what)->self_size; limit += limit * PARAM_VALUE (PARAM_LARGE_FUNCTION_GROWTH) / 100; so that limit is at most PARM_LARGE_FUNCTION_INSNS * PARM_LARGE_FUNCTION_GROWTH / 100? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43058