public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* is LTO aimed for large programs?
@ 2009-11-08 23:03 Basile STARYNKEVITCH
  2009-11-08 23:31 ` Robert Dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Basile STARYNKEVITCH @ 2009-11-08 23:03 UTC (permalink / raw)
  To: GCC Mailing List

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} ***

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-11-12 17:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-08 23:03 is LTO aimed for large programs? Basile STARYNKEVITCH
2009-11-08 23:31 ` Robert Dewar
2009-11-09  6:43   ` Basile STARYNKEVITCH
2009-11-09  7:13     ` Eric Botcazou
2009-11-09  9:44 ` Tobias Burnus
2009-11-09  9:57   ` Richard Guenther
2009-11-12 16:46   ` Jan Hubicka
2009-11-12 17:01     ` Robert Dewar
2009-11-09 12:35 ` Diego Novillo
2009-11-09 12:48   ` Richard Guenther
2009-11-09 12:52     ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).