[clang] [llvm] [Coroutines] Replace struct alloca frame with byte array and ptradd (PR #178359)
Weibo He via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 20 18:39:49 PST 2026
================
@@ -1173,7 +1168,11 @@ static void handleNoSuspendCoroutine(coro::Shape &Shape) {
coro::replaceCoroFree(SwitchId, /*Elide=*/AllocInst != nullptr);
if (AllocInst) {
IRBuilder<> Builder(AllocInst);
- auto *Frame = Builder.CreateAlloca(Shape.FrameTy);
+ // Create an alloca for a byte array of the frame size
+ auto *FrameTy = ArrayType::get(Type::getInt8Ty(Builder.getContext()),
+ Shape.FrameSize);
+ auto *Frame = Builder.CreateAlloca(
+ FrameTy, nullptr, AllocInst->getParent()->getName() + ".Frame");
----------------
NewSigma wrote:
AllocInst->getFunction()->getName()
https://github.com/llvm/llvm-project/pull/178359
More information about the cfe-commits
mailing list