[llvm-branch-commits] [clang] [Clang][CodeGen] Move AllocToken pass to backend LTO phases (PR #169360)

Marco Elver via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 26 07:58:29 PST 2025


melver wrote:

> Rather than having different ways to inject this pass for the different LTO backend pipelines, and for distributed vs in process ThinLTO, and also rather than passing internal options to the linker driver which we're trying to get away from, can the pass be added unconditionally from the PassBuilder::build*LTODefaultPipeline in the correct location and guarded by something in the IR?

I reworked it and it's added in PassBuilder now.

> In fact, looking at the AllocToken pass, it already appears to be a noop without the necessary attributes and intrinsics. Can the mode also be passed down in the IR via an attribute or at least a module flag to simplify the enablement?

Reworked to use module flags.

PTAL. Thanks!

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


More information about the llvm-branch-commits mailing list