[PATCH] D137866: [Coroutines] Do not add allocas for retcon coroutines

Jannik Silvanus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 01:26:37 PST 2022


jsilvanus added a comment.

Not your code, but:

Maybe it would be cleaner to check whether we need a frame object at all instead of adding special case handling for allocas?
Then, based on that condition, we could skip setup of the frame type and pointer, and leave the alloca's unchanged.

If that's too much of a change, I'm fine with the proposed change, as it just fixes the existing condition.



================
Comment at: llvm/test/Transforms/Coroutines/coro-retcon.ll:142
 ; CORO-NEXT:  entry:
 ; CORO-NEXT:    [[FRAMEPTR:%.*]] = bitcast i8* undef to %nosuspend.Frame*
+; CORO-NEXT:    [[A:%.*]] = alloca i32, align 4
----------------
Note the unused frame pointer here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137866/new/

https://reviews.llvm.org/D137866



More information about the llvm-commits mailing list