Hello All,
is gcc-trunk -flto -O2 aimed for medium sized programs (something like bash), or for bigger ones (something like the
linux kernel, the Xorg server, the Qt or GTK graphical toolkit libraries, or bootstrapping GCC itself. Currently it
seems that the stage3 compiler is not compiled with -flto - I suppose that would require a stage4 or perhaps even a
stage5.)?
I know my question is really naive, because what "large" means depend a lot.
I sometimes try using gcc-trunk -flto when recompiling new stuff. The biggest software I tried so far with success is
caia or malice by J.Pitrat (440KLOC of source, 10Mb binary) or ocamlrun (20?KLOC source, 212Kb binary) but I never used
it yet on very big software (like the linux kernel, or GCC itself).
Perhaps the question is when not to use -flto and use -fwhopr instead?
Maybe we might add a hint in the *.texi documentation like;
avoid using --flto on a program or library whose source size + binary size
is bigger than 30% of the RAM available?
[of course I don't know if the formula is good; we could try finding a better
one]
I have no idea if in practice the compilation time penalty of -flto -O2 is
quadratic in the size of the generated binary.
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***