Currently, for e.g. typeof(int) we emit something like this:
mov rcx, 0x7FF96C7D9BA0
call CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE
Can we just emit a raw pointer to m_hLoaderAllocatorObjectHandle with a jit-time known offset based on the typehandle and get rid of that call? (for non-collectible/non-shared types).
In my current jit-diff dump (PMI) I see 5898 call CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPEHANDLE
/cc @jkotas
Currently, for e.g.
typeof(int)we emit something like this:Can we just emit a raw pointer to
m_hLoaderAllocatorObjectHandlewith a jit-time known offset based on the typehandle and get rid of that call? (for non-collectible/non-shared types).In my current jit-diff dump (PMI) I see 5898
call CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPEHANDLE/cc @jkotas