Description
Hello.
According to the Facebook Research Paper (https://research.facebook.com/publications/bolt-a-practical-binary-optimizer-for-data-centers-and-beyond/), LLVM BOLT (https://github.com/llvm/llvm-project/blob/main/bolt/README.md) helps with achieving better performance for various packages like compilers and interpreters. I think it would be a good idea to enable LLVM BOLT for some packages to deliver faster binaries (or the possibility to recompile binaries with BOLT in an easier way) for users in Clear Linux since Clear Linux is all about performance.
Here I got some examples of how LLVM BOLT is already integrated into other projects:
- Rustc: Optimize
librustc_driver.so
with BOLT rust-lang/rust#116352 - CPython: gh-90536: Add support for the BOLT post-link binary optimizer python/cpython#95908
- Pyston:
- Clang: https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/BOLT.cmake
So at least for the projects above LLVM BOLT effects are tested and some preparations are already done in the upstream projects. In this case, it should be easier to enable BOLT for these packages.
For some projects right now there is ongoing work on integrating LLVM BOLT into the build scripts:
- Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1163978
- Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1789087
- The same for Propeller (a LLVM BOLT alternative): https://bugzilla.mozilla.org/show_bug.cgi?id=1509314
- NodeJS: Integrate LLVM BOLT into the build scripts nodejs/node#50379
- LDC: Add a build target for bolt-optimized ldc? ldc-developers/ldc#4228
*GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112492
More about LLVM BOLT performance results for other projects can be found in:
- Rustc:
- CPython: gh-90536: Add support for the BOLT post-link binary optimizer python/cpython#95908
- YDB: Consider using LTO + PGO + Bolt ydb-platform/ydb#140
- Clang:
- LDC: Add a build target for bolt-optimized ldc? ldc-developers/ldc#4228 (comment)
- NodeJS: https://aaupov.github.io/blog/2020/10/08/bolt-nodejs
- Chromium: https://aaupov.github.io/blog/2022/11/12/bolt-chromium
- MySQL, MongoDB, memcached, Verilator: https://people.ucsc.edu/~hlitz/papers/ocolos.pdf
More information about the topic can be found here: https://github.com/zamazan4ik/awesome-pgo
I don't create an issue per project (like "Enable BOLT for Clang", "Enable BOLT for GCC", etc.) since I think first we need to discuss the approach. If we agree with enabling BOLT, then we can create an additional issue (and use this issue as a BOLT meta issue).