I'd recommend looking at the work the LLVM team have done on this. [0] for example and there is a Youtube video from one of the LLVM confs if I recall correctly.
In a nutshell they are still researching this but their general approach is to split the coroutine up and devirtualise/inline the parts where they can.
In a nutshell they are still researching this but their general approach is to split the coroutine up and devirtualise/inline the parts where they can.
[0] https://llvm.org/devmtg/2016-11/Slides/Nishanov-LLVMCoroutin...