[llvm] Port CodeGenPrepare to new pass manager (and BasicBlockSectionsProfil… (PR #75380)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 23:58:31 PST 2024


================
@@ -1963,6 +1965,9 @@ Error PassBuilder::parsePassPipeline(ModulePassManager &MPM,
       Pipeline = {{"cgscc", std::move(*Pipeline)}};
     } else if (isFunctionPassName(FirstName,
                                   FunctionPipelineParsingCallbacks)) {
+      if (FirstName == "codegenprepare") {
+        MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>());
+      }
----------------
arsenm wrote:

I vaguely recall seeing this hack in another patch by @paperchalice. For now I would drop the FirstName check and just unconditionally add it?

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


More information about the llvm-commits mailing list