https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65076
--- Comment #49 from Jan Hubicka <hubicka at gcc dot gnu.org> --- I did some experiments about the increase of early inlining insns: - Early optimizers of both 4.9 and mainline process 9819 functions. - At release_ssa time, the statement count is 8% - at ipa-cp, we have 9% fewer functions at mainline (so inliing helps) - At copyrename2 time, GCC 4.9 has 2% more statements and same number of functions. The difference drops to 1% at .optimized time. I do not think pure statement count explains the problem - early optimization is small part of the queue. Also early-inlining-insns does not have at all that much effect on GCC 4.9 (26.1s -> 16.9s or a noise) A difference may be in a fact, that original metric used relative time benefits that computed estimated time saved over estimated time for executing both caller and callee. Now this metric drops to low values when caller is huge. New metric does not have this property and do not consider it a bad idea to inline into huge callers as long as time seems to improve measurably. I suppose it may account in overall slowdown as we get large functions more often. It seems supported by fact that mainline hits large-function-growth limit 285 times (about 9% of all functions output), while 4.9 7 times. I am also seeing some issues with firefox and the new javascript interpreter. It seems that current limit of inline-unit-growth (reduced from 30 to 15%) is too small for new firefox trees and there is very good improvement for increasing it back to 30%. This however of course makes this PR worse. I have patch to re-implement original badness metric in current tree, lets see.