================ @@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(Phase)) { + MPM.addPass(createModuleToFunctionPassAdaptor( ---------------- pasko wrote:
> the check for `Phase != ThinOrFullLTOPhase::FullLTOPostLink` is unnecessary, > `buildModuleSimplificationPipeline` isn't called for FullLTO post link Removed. Indeed there is an assertion for this a few lines prior. > I'm not sure why you're seeing that behavior if we're only running the > post-inline instrumenter once in the codegen pipeline Apparently I made a mistake when building the reproducer. When checking today I saw everything working as expected, i.e. <=1 bare hooks inserted per function in the final DSO. Sorry for the noise. https://github.com/llvm/llvm-project/pull/92171 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits