JIT: Improve wrapper method inliner heuristic#113266
JIT: Improve wrapper method inliner heuristic#113266hez2010 wants to merge 7 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
Diffs from MihuBot look promising to me. |
|
@MichalStrehovsky NativeAOT failures seem like an ilc preexisting bug? |
The scanner needs to precompute everything RyuJIT is going to look at. Looks like in this case RyuJIT decided to inline past a generic recursion cutoff. Maybe a fix would be to add a call to runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs Lines 101 to 104 in c8f32e5 But I'm afraid RyuJIT will ask |
| } | ||
|
|
||
| if ((codeAddr < codeEndp - sz) && (OPCODE)getU1LittleEndian(codeAddr + sz) == CEE_RET) | ||
| if ((codeAddr < codeEndp - sz) && doesMethodLookLikeWrapper(codeAddr + sz, codeEndp)) |
There was a problem hiding this comment.
Given it's called only here, it only supports
call
ldloc
box
ret
?
is this some specific pattern we need to support?
There was a problem hiding this comment.
nope. it's just that doesMethodLookLikeWrapper can return true for a single ret so that it can be reused here.
|
Closing for now as I don't have enough time to investigate the regression currently. |
Extracted from #113256, with additional improvements for boxed structs return.
newarr,newobjandinitobjldloc.*} +box} +ret@EgorBo