Clang makes it easy to enable Instrumentation PGO using bundled CMake cache files: https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/PGO.cmake Enabling is as simple as appending `-C llvm-project/clang/cmake/caches/PGO.cmake`. The benefits of enabling PGO this way are shown on slide 4 in this presentation: https://llvm.org/devmtg/2022-11/slides/Lightning15-OptimizingClangWithBOLTUsingCMake.pdf with speedups ranging from 10 to 20 percent 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
(In reply to Amir Aupov from comment #0) > Clang makes it easy to enable Instrumentation PGO using bundled CMake cache > files: > https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/PGO.cmake > > Enabling is as simple as appending `-C > llvm-project/clang/cmake/caches/PGO.cmake`. I'm not sure this actually works when you do a split build as we do.