Link-Time Optimizing Improved, But Still Takes A While On GCC 4.9
Phoronix: Link-Time Optimizing Improved, But Still Takes A While On GCC 4.9
The GCC 4.9 compiler that's about to be released has many improvements, including in the area of LTO (Link-Time Optimizations), but you must still have a fair amount of patience to compile with LTO support...
It would be interesting to compare compiles of Firefox, Chromium, Libreoffice, and Perl, including their memory usage.
You should also pass -fno-fat-lto-objects to GCC to make sure that LTO is used all the way. You generally want to use -fuse-linker-plugin too.
GCC 4.9 now defaults to -fno-fat-lto-files when plugin enabled linker is available. This should be visible in the benchmarks by about halving the LTO compile time. Also w/o plugin the LTO performance improvements are much smaller than with.
Michael, can you, please, repeat the benchmarks with plugin support?
Also forgot to add, if you use parallel make (-j=N), you probably also want to pass -flto=n to parallelize the LTO build process.
I am slowly working on this, the first three are hard to benchmarks. Perl is an interesting candidate indeed.
Originally Posted by STrRedWolf
So far I tested firefox at Dromaeo (that is rather poor benchmark for compiler generated code by spending a lot of time either in JIT generated code or tight string manipulation loops). Still the benefits are measurable http://dromaeo.com/?id=219677,219672,219877
It compares normal build, LTO build and LTO profiledbuild. So 7% for LTO and 14% for LTO+PDO (I repreated the tests to check it is off noise)
hubicka, will we see the icf/semantic function/duplicate function removal in gcc 4.10?
Can the Kernel be profiled? I think that is where it could gain some speed.
Originally Posted by hubicka
Kernel needs custom profiling runtime (libgcov). Google is definitely using it and they recently submitted patches to make GCC's libgcov bit more modular. I did not try it myself though. http://ltp.sourceforge.net/archive/o...-kernel.readme seems to have some docs.
Originally Posted by toyotabedzrock
Most probably. The patch needs review, but that is scheduler for early stage 1. (Among quite few other changes related to LTO).
Originally Posted by curaga
Tags for this Thread