Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907931 - sys-devel/clang: add BOLT use flag
Summary: sys-devel/clang: add BOLT use flag
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on: 895326
Blocks:
  Show dependency tree
 
Reported: 2023-06-06 04:18 UTC by Amir Aupov
Modified: 2024-01-09 14:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amir Aupov 2023-06-06 04:18:15 UTC
Follow-up to https://bugs.gentoo.org/907923.

BOLT is a post-link binary optimizer: https://github.com/llvm/llvm-project/tree/main/bolt#bolt

Clang makes it easy to enable BOLT using bundled CMake cache files: 
https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/BOLT.cmake

Enabling is as simple as appending `-C llvm-project/clang/cmake/caches/BOLT.cmake`.

BOLT can be enabled on top of Instrumentation PGO using BOLT-PGO.cmake.

The benefits of enabling BOLT (with and without PGO) this way are shown on slide 4 in this presentation:
https://llvm.org/devmtg/2022-11/slides/Lightning15-OptimizingClangWithBOLTUsingCMake.pdf

with IPC improvements of enabling both PGO and BOLT comparable to a CPU generation bump (slide 5), on a workload of compiling clang itself, which is representative of a modern C++ codebase, which in turn is a representative workload of a gentoo system (compiling c++ packages).

Reproducible: Always