JIT: Boost inlining for more derived returns#113256
JIT: Boost inlining for more derived returns#113256hez2010 wants to merge 6 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
| if (sig.retType == CORINFO_TYPE_CLASS) | ||
| { | ||
| exactSigRet = info.compCompHnd->isExactType(sig.retTypeClass); | ||
| } |
There was a problem hiding this comment.
We avoid calling VM apis during inlining - this potentially can be slow/trigger type load events for every inline attempt (and we do many of them)
There was a problem hiding this comment.
I meant not this one, but eeGetMethodSig(methodHnd, &methodSig); below
There was a problem hiding this comment.
this potentially can be slow/trigger type load events for every inline attempt (and we do many of them)
We are already resolving method tokens for calls while scanning the inlinee, which loads all the type dependencies, so I don't see this to be a problem.
There was a problem hiding this comment.
this potentially can be slow/trigger type load events for every inline attempt (and we do many of them)
We are already resolving method tokens for calls while scanning the inlinee, which loads all the type dependencies, so I don't see this to be a problem.
Yes and the initial impl of that caused a massive TP regression as far as I remember, so it's not an excuse to continue calling other VM stuff, if we want to land this, we need to measure/make sure it's cheap.
The main bottleneck in application startup are VM calls triggered by JIT's importer
|
Retrigger a @MihuBot as void returns were not filtered before. |
|
I'm not entirely sure I understand this heuristic, but the multiplier and the JIT-diff is too massive to land as is, e.g. it's 10x bigger than Andy's PR to enable EH inlining. Can you extract the CALLEE_LOOKS_LIKE_WRAPPER part to a separate PR? I think that one makes total sense |
Some diffs seem unexpected to me as well, will investigate later.
Sure. |
|
I think we should resolve the issue here to enable yield devirt instead of aggressively bumping the multiplier in the JIT. |
let's convert it to draft then (it shows up in our system as a stale pr) |
|
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Boost inlining for more derived returns.
Example:
Before:
Resulting in virtual calls:
After:
All virtual calls get devirtualized thanks to late devirtualization:
cc @AndyAyersMS