================ @@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, - bool EmitSummary) { +PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level) { ModulePassManager MPM; - MPM.addPass(EmbedBitcodePass(ThinLTO, EmitSummary, - ThinLTO - ? buildThinLTOPreLinkDefaultPipeline(Level) - : buildLTOPreLinkDefaultPipeline(Level))); - MPM.addPass(buildPerModuleDefaultPipeline(Level)); + MPM.addPass(buildThinLTOPreLinkDefaultPipeline(Level)); + MPM.addPass(EmbedBitcodePass()); + MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); ---------------- nikic wrote:
Yes, ModuleOptimization (plus I guess a call to addAnnotationRemarksPass) is what I would substitute here, and then add a note to the FatLTO docs that says something alone the lines of: > If FatLTO is used together with SamplePGO (as opposed to normal PGO), some > profile-based optimizations will only be applied when linking with LTO. I believe the other discrepancies that we discussed at the time have already been addressed in the meantime and SamplePGO is the only remaining issue. https://github.com/llvm/llvm-project/pull/72180 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits