Repository navigation
Simplify making IL base JIT Helpers - #108349
Conversation
- Currently, for best performance, one needs to know to update a switch statement in jitinterface.cpp whenever a helper is moved to managed - Instead, with this change, if the helper has a specified managed method implementation, that check will just work - Also, if there is a native implementation, then the native implementation will take precedence. (This is to allow for helpers to have alternative assembly based implementations) This should help fix a regression dotnet#108203 introduced with my recent work around generics lookups.
|
Tagging subscribers to this area: @mangod9 |
|
@davidwrighton there is also this code that you might want to change runtime/src/coreclr/vm/callcounting.cpp Lines 663 to 668 in b3a113a so for this "indirect -> direct" optimization to kick in, especially in micro-benchmarks, it's better to promote such helpers to Tier1 earlier. |
|
@EgorBo ... thanks for the heads up. I'll look into that later. |
…n returns NULL while jitting, and don't return null for cases which were chosen to avoid that with the old if statement
…ers_perf_improvement
| } | ||
| else | ||
| { | ||
| instGen_Set_Reg_To_Imm(EA_PTRSIZE, callTarget, (ssize_t)addr); |
There was a problem hiding this comment.
I think this could be just instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, ...) without if-else here. It will either use addr+add or just emit a 64bit constant inside the function itself. See its impl:
runtime/src/coreclr/jit/codegenarm64.cpp
Lines 2239 to 2242 in c6e3eb7
This should help fix a regression #108203 introduced with my recent work around generics lookups.