You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JIT: refactor to allow OSR to switch to optimized (#61851)
When OSR is enabled, the jit may still need to switch to optimized codegen if
there is something in the method that OSR cannot handle. Examples include:
* localloc
* loops in handlers
* reverse pinvoke (currently bypasses Tiering so somewhat moot)
* tail. prefixes (currently tolerated as Tiering should suffice)
When OSR is enabled, rework the "switch to optimize logic" in the jit to check
for these cases up front before we start importing code.
When both QuickJitForLoops and OnStackReplacement are enabled, this should ensure
that if we can't transition out of long-running Tier0 code (via OSR) then we will
instead optimize the method. Very few methods overall should opt-out of Tier0.
Note some of these unhandled constructs can eventually be handled by OSR, with
additional work.
For explicit tail calls: this should replicate the current logic where we always optimize
methods with explicit tail calls unless we're instrumenting them.
To make this work with OSR we simply won't put patchpoints in methods with explicit
tail calls, instead trusting that tiering can get us to optimized versions.
0 commit comments