================ @@ -744,6 +750,21 @@ static void addSanitizers(const Triple &TargetTriple, // LastEP does not need GlobalsAA. PB.registerOptimizerLastEPCallback(SanitizersCallback); } + + if (ClRemoveTraps) { + // We can optimize after inliner, and PGO profile matching. The hook below + // is called from `buildModuleOptimizationPipeline` just after profile use, + // and inliner is a part of `buildModuleSimplificationPipeline`, which is + // before `buildModuleOptimizationPipeline`. + PB.registerOptimizerEarlyEPCallback([&](ModulePassManager &MPM, ---------------- aeubanks wrote:
profile matching happens right before the inliner/function simplification pipeline (after the initial `EarlyFPM` and `GlobalCleanupPM` cleanup) https://github.com/llvm/llvm-project/pull/84214 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits