[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 00:47:00 PDT 2026


zmodem wrote:

https://github.com/llvm/llvm-project/pull/194690#issuecomment-4344922589 seems to mention a case where an optimization dropping this metadata leads to miscompilation:

> !coro.outside.frame is applied to `%b.addr`; this metadata is dropped when SROA removes the alloca and replaces it with direct uses of `%b`. `%b` is spilled into the coroutine frame later during CoroSplit.

> I am still concerning about the potential performance loss on using the intrinsic on parameters. Did you have any insight?

I guess I should find some benchmarks :) But I am concerned that we're relying on this metadata for correctness. It's a long term LLVM contract that dropping metadata should not change the validity of IR.

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


More information about the llvm-commits mailing list