If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Some packages do not benefit from -O3 optimizations, on the contrary they will perform worse. It will be needed to filter them out from being further optimized.
Anyway I love the idea of a centralized repository with all the LTO/Graphite overrides for known broken packages.

Comment

Graphite is bad. No better way to put this. It causes ICEs in gcc and there are bug reports piling up on it with nobody around to fix them. Options such as -fgraphite-identity and -floop-nest-optimise are still not part of any of the -Ox switches. Looks like it's just going to fall off the wagon at some point.

LTO of course is working great, but it doesn't always improve the code even when it becomes shorter. Profiling code is still more profitable and only in combination with profiling does LTO begin to shine.

So I'm holding my breath when I see how some of the Gentoo users crank up compiler optimizations on the big scale. I did follow the LTO thread on the Gentoo forum for a while, but they're really just pushing the "pedal to the metal" to see what breaks. I doubt many of them go the extra mile and run the respective test suites for all the software they're compiling to verify the correctness of the optimizations.

1 like

Comment

LTO of course is working great, but it doesn't always improve the code even when it becomes shorter. Profiling code is still more profitable and only in combination with profiling does LTO begin to shine.

I'd hope the code was profiled already. If not, it is about time.

It is great to see this work being done and communicated. Kudos to Shane!

Comment

"This repository is a snapshot of my Gentoo Portage configuration. Earlier in 2017, I set out to do an experiment in building Gentoo using the -O3 gcc compiler option. It is well documented on the Gentoo wiki that this is not a recommended configuration, but I wanted to see to what extent things would break. As it turns out, most packages that cannot be built with -O3 are already forced to build with -O2 anyways, so I experienced very few failures. With the success I had using -O3, I decided to make things a little more complicated and toss the Graphite optimizations in the mix. Then I went a bit more daring and tossed in LTO. After about 8 months of doing this, I feel good enough about my configuration that I decided to publish it for interested parties to see. This repository will be actively updated and tested, as it is the basis for my own Portage configuration.
"

Comment

Graphite is bad. No better way to put this. It causes ICEs in gcc and there are bug reports piling up on it with nobody around to fix them. Options such as -fgraphite-identity and -floop-nest-optimise are still not part of any of the -Ox switches. Looks like it's just going to fall off the wagon at some point.

gcc-7.2.0 has those bugs fixed. I have graphite on all my packages ( and LTO on selected) and with gcc-7.2.0 I can't remember when a package build has failed due to graphite...

Comment

Does Arch still have srcpac?
You could always set the optimizations and recompile your installed packages and newley installed ones with that instead of pacman.

I haven't used Arch for almost 10yrs now so not exactly sure what they have for building from source anymore, if anything.

As for Gentoo... It's still one of the best around to learn from. And even hitting up lfs and doing a distro from scratch and then tweaking it to your specific wants is a ton of fun the first couple times around when learning.

Go nuts on optimizations and see what works or doesn't then tweak each program for the best performance flags as wanted.