[llvm] [ctx_prof] Insert the ctx prof flattener after the module inliner (PR #107499)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 20:06:27 PDT 2024


================
@@ -1017,6 +1017,11 @@ PassBuilder::buildModuleInlinerPipeline(OptimizationLevel Level,
   IP.EnableDeferral = false;
 
   MPM.addPass(ModuleInlinerPass(IP, UseInlineAdvisor, Phase));
+  if (!UseCtxProfile.empty()) {
+    MPM.addPass(GlobalOptPass());
+    MPM.addPass(GlobalDCEPass());
+    MPM.addPass(PGOCtxProfFlatteningPass());
----------------
mtrofin wrote:

yes. thanks.

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


More information about the llvm-commits mailing list