[llvm] [LoopInfo] Pointer to stack object may not be loop invariant in a coroutine function (PR #149936)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 09:40:52 PDT 2025


https://github.com/efriedma-quic requested changes to this pull request.

CC @rnk @zmodem @ChuanqiXu9 @rkjnsn

My understanding from when we last looked at allocas, #127653, is that an alloca is either coro.outside.frame, in which case it doesn't exist after a suspend, or it's not, in which case the address of the alloca refers to its address in the coroutine frame.

If the address actually does need to change, you can't hack up LICM like this; breaking the rules of SSA form will have unmanageable effects on a bunch of optimizations.  You need an intrinsic to mark where, exactly, the computation of the address is supposed to happen.

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


More information about the llvm-commits mailing list