[llvm] [PGO] Add `llvm.loop.estimated_trip_count` metadata (PR #148758)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 08:27:14 PDT 2025


================
@@ -1268,8 +1269,13 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
     MPM.addPass(MemProfUsePass(PGOOpt->MemoryProfile, PGOOpt->FS));
 
   if (PGOOpt && (PGOOpt->Action == PGOOptions::IRUse ||
-                 PGOOpt->Action == PGOOptions::SampleUse))
+                 PGOOpt->Action == PGOOptions::SampleUse)) {
     MPM.addPass(PGOForceFunctionAttrsPass(PGOOpt->ColdOptType));
+    // TODO: Is this the right place for this pass?  Should we enable it in any
----------------
mtrofin wrote:

oh, and also please insert it at line 1243, before `return MPM`

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


More information about the llvm-commits mailing list