investigate building Clang itself with LTO + PGO |
|
Issue descriptionIt's reported to make Clang significantly faster. The only downsides I can think of is that it makes the build script more complicated, packaging a bit slower, and we'd have to decide if we want to use this build mode also for ToT builds. We already build LLD with LTO, so just doing that for everything would be a simplification actually. Should probably do this as part of Issue 884608.
,
Nov 16
Someone had sent a patch for this a while ago, https://codereview.chromium.org/2793343002/
,
Jan 9
Just in case you haven't seen it yet, GCC developers optimized Firefox builds recently with LTO/PGO and the optimized build showed some significant improvements in binary size and performance: 1) Original post: http://hubicka.blogspot.com/2018/12/firefox-64-built-with-gcc-and-clang.html 2) Follow up: http://hubicka.blogspot.com/2018/12/even-more-fun-with-building-and.html Hence it might be worthwile for Chromium, too?
,
Jan 9
I don't see how a blog post about building Firefox with GCC/LTO/PGO is related to compiling clang?
,
Jan 9
Let me explain then, he is currently looking for real world test cases to polish the GCC LTO/PGO implementation and chose Firefox as a test case where he compares GCC vs. Clang PGO/LTO builds. There were some critical perfomance bugs identified and fixed along that way and both projects profited from that work. This effort made at least the Fedora package maintainer reconsider their decision of dropping GCC for their Firefox build in favor of Clang and users now enjoy a better performing browser than before. There is a collaboration opportunity here for Chromium as well, as he might have a look on Chromium soon (as mentioned by him in the Phoronix forums today [3]). Also he works for Suse and they build Chromium still with GCC. I guess there is some interest on your side as well to see how much improvement LTO + PGO from both compilers could bring to the table even though upstream Chromium is built with Clang nowadays? [3] = https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1071721-fedora-s-firefox-to-stick-with-gcc-over-clang-beefed-up-by-lto-pgo-optimizations?p=1071996#post1071996
,
Jan 9
That seems unrelated to this bug still (which is about building clang, not chrome). Anyone is free to build chrome with gcc and publish perf metrics :-) I'd find that interesting to read.
,
Jan 10
Ah, ok. I got it now. I've thought this bug was about building Chromium with Clang + LTO + PGO. My bad! But great to see that such work would be of interest for you and the Chromium community nevertheless. :) |
|
►
Sign in to add a comment |
|
Comment 1 by h...@chromium.org
, Nov 16