[clang] [llvm] wip: Move instrumentation passes (PR #92171)
Egor Pasko via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 05:22:39 PDT 2024
================
@@ -1028,6 +1029,14 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
Phase != ThinOrFullLTOPhase::ThinLTOPostLink)
MPM.addPass(SampleProfileProbePass(TM));
+ // Instrument function entry and exit before all inlining.
+ if (Phase != ThinOrFullLTOPhase::ThinLTOPostLink &&
+ Phase != ThinOrFullLTOPhase::FullLTOPostLink &&
+ Phase != ThinOrFullLTOPhase::None) {
----------------
pasko wrote:
I was confused by setting None prior to that in `buildPerModuleDefaultPipeline`, but it is never called for this assignment to happen. Indeed, since None means non-LTO cases, we should instrument with None. Done.
https://github.com/llvm/llvm-project/pull/92171
More information about the llvm-commits
mailing list