[llvm-branch-commits] [llvm] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI coroutine ramp functions during CoroSplit (PR #99283)

Chuanqi Xu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 7 00:30:30 PDT 2024


ChuanqiXu9 wrote:

After I took a quick look at https://github.com/llvm/llvm-project/pull/99285, I feel this is not what I thought when I heard the idea. Correct me if I misunderstand it.

The problems are:
1. It looks like all the `.noalloc` variant are emitted all the time. This is absolutely not good. It emits duplicated code (especially currently its linkage is not internal). What I had in mind is to create `.noalloc` variant on need or lazily.
2. The original ramp function and the `.noalloc` variant shares a lot of codes if I am not mistaken. Then it is pretty bad for the code size. What I had in mind is, after we generate the `.noalloc` variant, we will rewrite the ramp function too and the ramp function will call the `.noalloc` function after it allocates the coroutine frame.

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


More information about the llvm-branch-commits mailing list