[llvm] coro: Do not capture pointer locals that have no provenance (PR #223321)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 09:55:06 PDT 2026


dingxiangfei2009 wrote:

@ChuanqiXu9 I see. So for some reason lifetime markers are not used for `retcon` entirely, and so is this code rather limited to `retcon` but not the usual C++ `co_await` coro.

A small observation I am having here. If `capture(address)` eventually leads to capture of the alloca into the detached frame so that we observe stability in the address bytes, I am afraid that this behaviour is already diverging from what Rust believes. Rust does not believe that uncaptured locals in coroutines necessarily get assigned a stable address. I am glad to see that lifetime markers are actually used for analysis to decide the escaping. It was a bit unfortunate that Rust could not use that lowering directly.

cc @jyknight 

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


More information about the llvm-commits mailing list