Open
Description
Developers frequently create synchronous Task-returning methods wrapping an async one to avoid additional state machines. For example, it is being done right now in #115688.
With runtime async this is a significant deoptimization. We should figure out how to optimize this pattern. One possible way would be to boost inlining for synchronous Task-returning methods calls by runtime async methods, and then adding an additional IR-based optimization of AsyncHelpers.Await(M())
later in the JIT (the current optimization is based on IL pattern recognition that will not kick in after inlining).