Skip to content

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Sep 1, 2025

Backport 7fca1f8

Requested by: @boomanaiden154

@llvmbot
Copy link
Member Author

llvmbot commented Sep 1, 2025

@mtrofin What do you think about merging this PR to the release branch?

@llvmbot llvmbot requested a review from mtrofin September 1, 2025 03:55
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Sep 1, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Sep 1, 2025

@llvm/pr-subscribers-clang

Author: None (llvmbot)

Changes

Backport 7fca1f8

Requested by: @boomanaiden154


Full diff: https://github.com/llvm/llvm-project/pull/156271.diff

1 Files Affected:

  • (modified) clang/cmake/caches/PGO.cmake (+1-1)
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

@boomanaiden154
Copy link
Contributor

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.

@mtrofin mtrofin requested a review from tstellar September 1, 2025 04:03
Copy link
Member

@mtrofin mtrofin left a 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

@github-project-automation github-project-automation bot moved this from Needs Triage to Needs Merge in LLVM Release Status Sep 1, 2025
@boomanaiden154
Copy link
Contributor

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,.

@tru
Copy link
Collaborator

tru commented Sep 3, 2025

LGTM

@tru tru merged commit ef3a6bd into llvm:release/21.x Sep 3, 2025
1 check was pending
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Sep 3, 2025
Copy link

github-actions bot commented Sep 3, 2025

@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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
Development

Successfully merging this pull request may close these issues.

4 participants