https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/155957
Currently the clang CMake caches use FE PGO for instrumentation (LLVM_BUILD_INSTRUMENTED=ON). However, IRPGO is generally regarded as better for performance. I am measuring about a 1.5% performance gain when building libLLVMSupport.a using this configuration versus what existed before this commit. I would suspect the gains are larger on other platforms like Windows where we cannot subsume any gains using PLO. >From 2c5164645baba6f9afe000f1e4a035b4f71f1645 Mon Sep 17 00:00:00 2001 From: Aiden Grossman <[email protected]> Date: Fri, 29 Aug 2025 01:47:20 +0000 Subject: [PATCH] [Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches Currently the clang CMake caches use FE PGO for instrumentation (LLVM_BUILD_INSTRUMENTED=ON). However, IRPGO is generally regarded as better for performance. I am measuring about a 1.5% performance gain when building libLLVMSupport.a using this configuration versus what existed before this commit. I would suspect the gains are larger on other platforms like Windows where we cannot subsume any gains using PLO. --- clang/cmake/caches/PGO.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/cmake/caches/PGO.cmake b/clang/cmake/caches/PGO.cmake index 15bc755d110d1..d6471160037c1 100644 --- a/clang/cmake/caches/PGO.cmake +++ b/clang/cmake/caches/PGO.cmake @@ -5,7 +5,7 @@ set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "") set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") -set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED ON CACHE BOOL "") +set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED IR CACHE BOOL "") set(CLANG_BOOTSTRAP_TARGETS generate-profdata stage2 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
