On 04/27/14 02:58 AM, Martin Vaeth wrote:
Rich Freeman <ri...@gentoo.org> wrote:
FWIW the list of packages I have issues with include:
Not sure whether this is the right place to post it.
It's interesting to see that rather lengthy list. From a compiler
engineer perspective I'd like to toss in my opinion
---------------------
Compiler flags are typically meant to do one or two things. Improve
performance or reduce binary (code size). Pragmatically nobody gives a
f* if grep has been optimized to the max since it's usually not the
bottleneck. Having LTO and whole program optimizations turned on for
every package will probably not give you a noticeably faster system, but
will certainly slow your build down. (Due to rather large link times)
The packages which it really *should* be turned on for - anything which
is computationally complex, Fortran and stuff where performance matters.
I don't know gcc's LTO or what it's capable of, but in our compiler it
would also potentially improve large c++ applications a lot. (It should
help inline more aggressively and remove c++ layer overhead). In
practice though - the most important c++ applications tend to be too
huge and end up hitting bugs. They will also typically be very very long
link times. (I've seen 30+ minutes - system specs and all things being
relative of course..)
Go ping the gentoo-science guys and get their feedback - they may have
the most experience with this...
----------------------
Not to be a smart-ass, but will someone start a thread on global PGO
(profile guided optimizations) next? imho it would be interesting and
great to have some general training data already contributed next to the
ebuilds. For the science stuff I wouldn't recommend it, but who knows..