This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is LTO aimed for large programs?


Basile STARYNKEVITCH wrote:

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).

Compared to some of the application systems we deal with gcc is large, but not very large. We have several Ada users with millions of lines of
code in a single program.

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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]