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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 07:29:30 PST 2025


teresajohnson wrote:

> Could you also add the alloc token metadata, and/or whatever else is needed to cause the allocator calls to kick in, to at least one of the operator new calls in llvm/test/Transforms/InstCombine/simplify-libcalls-new.ll (or create a new small test that has this), and invoke various pipelines on it via opt to ensure we still get the expected transformations (to hot cold operator new and subsequently the alloc token version)? E.g. `opt -passes='thinlto<O2>'` and `opt -passes='lto<O2>'` ?

Largely lgtm to me, except I had a comment about simplifying the cl::opt checks. Also, please add a change to an existing memprof test like suggested above - this will ensure the phase ordering stays correct.

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


More information about the llvm-commits mailing list