[llvm] [PGO][profcheck] ignore explicitly cold functions (PR #151778)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 2 08:41:53 PDT 2025


================
@@ -63,6 +67,17 @@ bool ProfileInjector::inject() {
   // will get the same BPI it does if the injector wasn't running.
   auto &BPI = FAM.getResult<BranchProbabilityAnalysis>(F);
 
+  // Inject a function count if there's none. It's reasonable for a pass to
+  // want to clear the MD_prof of a function with zero entry count. From a
+  // metadata economy perspective, if a profile comes empty for a function, it's
----------------
mtrofin wrote:

reworded, ptal

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


More information about the llvm-commits mailing list