[clang] [llvm] Move instrumentation passes (PR #92171)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 13:15:52 PDT 2024


================
@@ -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(
----------------
aeubanks wrote:

actually is it possible to add this into `EarlyFPM` below? it's nice to have fewer module->function adaptors. (e.g. in `EarlyFPM` we run all the function passes on a single function before moving to the next one which is nice for memory locality)

sorry for suggesting this so late, since it'll require updating all the pipeline tests... but first check that none of the other tests fail

https://github.com/llvm/llvm-project/pull/92171


More information about the llvm-commits mailing list