[clang] [llvm] [InstrPGO] Support cold function coverage instrumentation (PR #109837)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 12:57:11 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 =
----------------
rnk wrote:

Setting this global variable here has introduced a data race detected by TSan when different threads set up different pass pipelines. Was this intentional? Did you mean to use `==` instead of `=`?

https://github.com/llvm/llvm-project/pull/109837


More information about the cfe-commits mailing list