As a platform developer I'm interested in using a PGO build of clang (or gcc) that is trained on the Firefox codebase. I attempted to do this on my own and failed horribly, but it seems like something our build team could provide. I don't need anything terribly special or smart, just a standard archive such as what llvm.org provides . Personally I'd use this on Ubuntu 16.04 x86_64, I imagine a build for OSX would be welcome as well. It's also possible this isn't worth the effort, so just evaluating whether a PGO build of clang has better performance should be a prerequisite.  http://releases.llvm.org/download.html#3.9.0
I came across this, where they compiled FF with PGO GCC. https://gcc.gnu.org/ml/gcc/2013-03/msg00210.html " Firefox: vanilla: 5143.27s user 267.27s system 346% cpu 26:02.03 total PGO : 4590.37s user 270.21s system 344% cpu 23:28.89 total LTO : 5056.11s user 268.04s system 348% cpu 25:28.73 total LTO+PGO: 4598.79s user 269.01s system 347% cpu 23:22.13 total * GCC build with PGO is ~10% faster than a vanilla bootstrapped compiler. " So, looks like a worthwhile optimisation.
(In reply to mayankleoboy1 from comment #1) > I came across this, where they compiled FF with PGO GCC. > https://gcc.gnu.org/ml/gcc/2013-03/msg00210.html > > > " > > Firefox: > vanilla: 5143.27s user 267.27s system 346% cpu 26:02.03 total > PGO : 4590.37s user 270.21s system 344% cpu 23:28.89 total > LTO : 5056.11s user 268.04s system 348% cpu 25:28.73 total > LTO+PGO: 4598.79s user 269.01s system 347% cpu 23:22.13 total > > * GCC build with PGO is ~10% faster than a vanilla bootstrapped compiler. > " > > So, looks like a worthwhile optimisation. That's great! Unfortunately I'm not the one to implement this, hopefully someone on the build team will take a look.
FWIW, I got apparent improvements in build time by building my compiler from source, as well as building with PGO: https://jdashg.github.io/misc/pgo-clang.html I can back up a ~10% compile time advantage from PGO, though this was only a 5% total build time advantage for my -j32 machine. Compiling with -O3 and -march=native was a much larger win, so I'm not sure distributing PGO binaries is the right solution. I did not test -O3 without -march=native. This is worth following up on, but I expect performance of my system compiler (Arch Linux) package to be similar to a build without -march=native.
Actually in more controlled testing, I did find PGO to be the largest win by far. (12m25s->10m30s)
You need to log in before you can comment on or make changes to this bug.