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

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 14:07:58 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());
----------------
david-xl wrote:

should this be done only for postLink Phase?

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


More information about the llvm-commits mailing list