http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55478
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-11-27 00:00:52 UTC --- OK, the inliner recognizes that the call is going to be inlined. At -O2 this is however ignored because the caller is too large and not declared inline. I am not sure if we really want to enforce inlining in this case At -O3 this is ignored because the function is called just once and thus call is cold. This is also sort of correct, but a testcase that will do the same in a large loop will suffer from the same problem. I guess we should introduce the notion of heavy calls like open64 does and inline in such case (i.e. inline into functions called once when some of inline hints are met). I will look into this.