Conversation
Under some jit stress modes the jit tries to inline StelemRef_Helper into StelemRef. StelemRef is jitted very early and the jit is not yet prepared to handle this inline. Fixes dotnet#33298.
|
I couldn't add an area label to this PR. Checkout this page to find out which area owner to ping, or please add exactly one area label to help train me in the future. |
|
BTW. Do we have any way to indicate "do not inline, but tailcall is ok". We have an assumption that |
|
Would it be better to reorder things to make this unnecessary? |
|
Reorder when the method is JIT-ted or reordering something in its implementation ? |
|
reorder when it is JITed, or when other things happen during startup |
We don't allow tail calls from callers marked runtime/src/coreclr/src/vm/jitinterface.cpp Lines 8270 to 8283 in dca3429 If the callee has |
|
Or at least add comment for the NoInlining attribute to describe why it is there. |
|
from the trace it looks like we would need to load CastCache type before jitting the helpers. I think we do not need to initialize the casting cache, just load the type - since we would need the static field if we try to inline. |
I misread that line. Would we still inline |
|
If I understand what Jan suggests; Is that just adding somewhere in |
|
Actually - which field is missing its type? |
Yes, having |
|
All is good then. |
It's |
|
Not sure about comment. There are 2 more methods in that file that use the same pattern - small NoInline helper that inlines TryGet + has some simple checks. That is mostly to make sure that those checks do not end up inlined in the caller. The caller is typically the "fast path" and the no inline method is the next tier. If you can come up with a simple explanation, please add to all 3 cases. |
|
I tried adding |
|
I think it is ok as is. |
Under some jit stress modes the jit tries to inline StelemRef_Helper into
StelemRef. StelemRef is jitted very early and the jit is not yet prepared
to handle this inline.
Fixes #33298.