<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Hi all,</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;">I find that the ramp function of coroutine whose initial_suspend is always_suspend (Let me call it "init-suspend-coroutine") </div><div  style="clear:both;">would be very simple. Normally it would only contain one basic block. And all of the codes in the coroutine body would be</div><div  style="clear:both;">in the resume function of coroutine.</div><div  style="clear:both;">For the ramp function of coroutine whose initial_suspend isn't always_suspend (Let me call it "init-no-suspend-coroutine"),</div><div  style="clear:both;">it may be large and it may contain the codes in the coroutine body. It may cause the size of codes be multiple of the original</div><div  style="clear:both;">size. And the large ramp function is harder to inline and harder to be elided.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">I want to make the ramp function for init-no-suspend-coroutine keep the same formal with the init-suspend-coroutine.</div><div  style="clear:both;">My plan is to insert a fake suspend in the front of initial_suspend in the CodeGen phase of clang and in the llvm part, we can</div><div  style="clear:both;">insert a tail call to the resume function so the control flow would remain with the original.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Does any one have any suggestion?</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Thanks,</div><div  style="clear:both;">Chuanqi</div></div>