[llvm] [nfc] Clarify when the various PGO instrumentation passes run (PR #92330)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 12:12:18 PDT 2024


================
@@ -1145,29 +1145,41 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
   MPM.addPass(createModuleToFunctionPassAdaptor(std::move(GlobalCleanupPM),
                                                 PTO.EagerlyInvalidateAnalyses));
 
-  // Invoke the pre-inliner passes for instrumentation PGO or MemProf.
-  if (PGOOpt && Phase != ThinOrFullLTOPhase::ThinLTOPostLink &&
-      (PGOOpt->Action == PGOOptions::IRInstr ||
-       PGOOpt->Action == PGOOptions::IRUse || !PGOOpt->MemoryProfile.empty()))
+  const bool IsPreLink = Phase != ThinOrFullLTOPhase::ThinLTOPostLink;
----------------
mtrofin wrote:

done

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


More information about the llvm-commits mailing list