-
Notifications
You must be signed in to change notification settings - Fork 14.9k
release/21.x: [Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches (#155957) #156271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@mtrofin What do you think about merging this PR to the release branch? |
@llvm/pr-subscribers-clang Author: None (llvmbot) ChangesBackport 7fca1f8 Requested by: @boomanaiden154 Full diff: https://github.com/llvm/llvm-project/pull/156271.diff 1 Files Affected:
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
|
This makes it easier to use the new options in the CI container since we build from the release branch. This should be a relatively safe backport given how small the change is in addition to how infrequently these CMake caches change at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but you probably want the release branch owner to lgtm, too
Yeah. That's @tru currently. They're the only ones with merge permissions, so have to be involved either way,. |
LGTM |
@boomanaiden154 (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. |
) 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. (cherry picked from commit 7fca1f8)
Backport 7fca1f8
Requested by: @boomanaiden154