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
Hello! Any news for this point?
Wow, that "BOLT" thing has a lot of performance gains. Ok, maybe I can get how to update ebuild to make clang build itself with BOLT Though I don't get how to make BOLT apply to other packages by not manually editing every ebuild.
Accidentely when was rereading whole Handbook I found this: https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Hooking_into_the_emerge_process Maybe it's possible to hook before src_install and via some environment variables scan folder for binaries and apply bolt to them...