[clang] [llvm] [LTO][AllocToken] Support AllocToken instrumentation in backend (PR #169358)

Marco Elver via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 07:04:43 PST 2025


================
@@ -1615,6 +1617,9 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
   MPM.addPass(createModuleToFunctionPassAdaptor(std::move(OptimizePM),
                                                 PTO.EagerlyInvalidateAnalyses));
 
+  if (LTOPostLink)
----------------
melver wrote:

Done.
I've decided to completely remove explicit insertion of the pass by Clang. This is cleaner and also more reusable.

I found the O0 pipeline doesn't run InferFunctionAttrsPass, and seems to fail lots of tests if I do add it (more IR attributes everywhere), but I think it's ok if that's added by Clang if required; other language frontends have to do the same, should they choose to emit C or C++ standard library calls.

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


More information about the llvm-commits mailing list