[clang] [llvm] [InstrPGO] Support cold function coverage instrumentation (PR #109837)
Lei Wang via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 13:27:37 PDT 2024
================
@@ -1182,8 +1187,13 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
const bool IsCtxProfUse =
!UseCtxProfile.empty() && Phase == ThinOrFullLTOPhase::ThinLTOPreLink;
+ // Enable cold function coverage instrumentation if
+ // InstrumentColdFuncOnlyPath is provided.
+ const bool IsColdFuncOnlyInstrGen = PGOInstrumentColdFunctionOnly =
----------------
wlei-llvm wrote:
Thanks for pointing out. It's intentional to set the global variable, I wasn't aware it will cause data race. I will try to change it to local one.
https://github.com/llvm/llvm-project/pull/109837
More information about the cfe-commits
mailing list