aeubanks added a comment. This seems like the wrong fix to me. ThinLTO only runs the simplification pipeline pre-link, then runs it again plus the optimization pipeline. The optimization pipeline is the only place that OptimizerLastEPCallback should run (aside from the -O0 pipeline). Basically, the OptimizerLastEPCallbacks should only ever run once throughout all of compilation for a given module.
So it seems like LTO should do the same and only run the simplification pipeline pre-link, rather than just forward to `buildPerModuleDefaultPipeline()`, which runs both. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96320/new/ https://reviews.llvm.org/D96320 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits