https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112492

            Bug ID: 112492
           Summary: Add LLVM BOLT support to the GCC build scripts
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zamazan4ik at tut dot by
  Target Milestone: ---

Hi!

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 GCC even after PGO-optimized GCC build.

I think will be a good idea to add support for building GCC with BOLT as it's
already for PGO-optimized GCC build with "make profiledbootstrap" target.
Integrating LLVM BOLT to the build scripts allows maintainers in a much easier
way to enable LLVM BOLT for GCC in their .spec files.

Here I got some examples of how LLVM BOLT is already integrated into other
projects:

* Rustc: https://github.com/rust-lang/rust/pull/116352
* CPython: https://github.com/python/cpython/pull/95908
* Pyston:
  - https://github.com/pyston/pyston#building
  - https://github.com/pyston/pyston/blob/pyston_main/Makefile#L200
* Clang:
https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/BOLT.cmake

More about LLVM BOLT results for other projects can be found in:

* Rustc:
  - https://github.com/rust-lang/rust/pull/116352
  -
https://www.reddit.com/r/rust/comments/y4w2kr/llvm_used_by_rustc_is_now_optimized_with_bolt_on/
* CPython: https://github.com/python/cpython/pull/95908
* YDB: https://github.com/ydb-platform/ydb/issues/140
* Clang:
  -
[Slides](https://llvm.org/devmtg/2022-11/slides/Lightning15-OptimizingClangWithBOLTUsingCMake.pdf)
  - [Results on building
Clang](https://github.com/ptr1337/llvm-bolt-scripts/blob/master/results.md)
  - [Linaro
results](https://android-review.linaro.org/plugins/gitiles/toolchain/llvm_android/+/f36c64eeddf531b7b1a144c40f61d6c9a78eee7a)
  - [on AMD
7950X3D](https://github.com/llvm/llvm-project/issues/65010#issuecomment-1701255347)
* LDC:
https://github.com/ldc-developers/ldc/issues/4228#issuecomment-1334499428
* 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 can be found here: https://github.com/zamazan4ik/awesome-pgo

Reply via email to