================ @@ -1020,21 +1022,23 @@ void EmitAssemblyHelper::RunOptimizationPipeline( } if (CodeGenOpts.FatLTO) { - MPM = PB.buildFatLTODefaultPipeline(Level, PrepareForThinLTO, - PrepareForThinLTO || - shouldEmitRegularLTOSummary()); + MPM.addPass(PB.buildFatLTODefaultPipeline( + Level, PrepareForThinLTO, + PrepareForThinLTO || shouldEmitRegularLTOSummary())); } else if (PrepareForThinLTO) { - MPM = PB.buildThinLTOPreLinkDefaultPipeline(Level); + MPM.addPass(PB.buildThinLTOPreLinkDefaultPipeline(Level)); } else if (PrepareForLTO) { - MPM = PB.buildLTOPreLinkDefaultPipeline(Level); + MPM.addPass(PB.buildLTOPreLinkDefaultPipeline(Level)); } else { - MPM = PB.buildPerModuleDefaultPipeline(Level); + MPM.addPass(PB.buildPerModuleDefaultPipeline(Level)); } } // Add a verifier pass if requested. We don't have to do this if the action // requires code generation because there will already be a verifier pass in // the code-generation pipeline. + // Since we already added a verifier pass above, this + // might even not run the analysis, if previous passes caused no changes. ---------------- rjmccall wrote:
I didn't realize that the verifier was implemented as an analysis that doesn't run if nothing has changed in the module since the last time it was run. Are you sure this is true? https://github.com/llvm/llvm-project/pull/68015 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits