================
@@ -1455,6 +1462,74 @@ struct SwitchCoroutineSplitter {
setCoroInfo(F, Shape, Clones);
}
+ // Create a variant of ramp function that does not perform heap allocation
+ // for a switch ABI coroutine.
+ //
+ // The newly split `.noalloc` ramp function has the following differences:
+ // - Has one additional frame pointer parameter in lieu of dynamic
+ // allocation.
+ // - Suppressed allocations by replacing coro.alloc and coro.free.
+ static Function *createNoAllocVariant(Function &F, coro::Shape &Shape,
+ SmallVectorImpl<Function *> &Clones) {
+ auto *OrigFnTy = F.getFunctionType();
----------------
ChuanqiXu9 wrote:
nit: I feel better with an assertion here that the ABI is switch ABI.
https://github.com/llvm/llvm-project/pull/99283
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits