Quoting Jan Hubicka <hubi...@ucw.cz>:
The behaviour change is about COMDAT functions that are larger than call
overhead but either called just once or small enough so code growth caused
by inlining is smaller than the function body size itself. In these cases
we made the assumption that overall program size will change and inlined
in previous GCC releases.
I.e., we assumed that the number of TU this function was used was 1.
This asusmption is not correct (it is correct for static functions
and also for
size of .o file, but not for whole binary) and the problem can be
demonstrated
by making very large comdat function that is used once in very many units.
Thus I've changed the behaviour in GCC 4.5 since it is more safe.
It seems to be equivalent to assume the number of TU this function is used
in is infinity.
How about a parameter for the number of TU we guess the function will be
needed in?