You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Finish treating the Unsafe APIs as JIT intrinsics #69220
A majority of the APIs on System.Runtime.CompilerServices.Unsafe were converted to be JIT intrinsics as part of #68739 and later more as part of #85562
The remaining unhandled ones are:
NI_SRCS_UNSAFE_CopyBlock
NI_SRCS_UNSAFE_CopyBlockUnaligned
NI_SRCS_UNSAFE_InitBlock
NI_SRCS_UNSAFE_InitBlockUnaligned
NI_SRCS_UNSAFE_Unbox
We should ensure these are likewise handled as JIT intrinsics to further improve code quality and JIT throughput where possible
Once this is done, we can switch these intrinsics onto the same plan as hardware intrinsics, implement them using self-recursive pattern in C# and delete the IL intrinsic expansion in VM/AOT (getILIntrinsicImplementationForUnsafe and Internal.IL.Stubs.UnsafeIntrinsics).
Reacted by Igor Bagdamyan
Reacted by Tanner Gooding, Steve and D3-LucaPiombino
NI_SRCS_UNSAFE_Copy, NI_SRCS_UNSAFE_Read, NI_SRCS_UNSAFE_ReadUnaligned, NI_SRCS_UNSAFE_Write and NI_SRCS_UNSAFE_WriteUnaligned can be removed from the list now.
Activity
jkotas commentedon May 12, 2022
Once this is done, we can switch these intrinsics onto the same plan as hardware intrinsics, implement them using self-recursive pattern in C# and delete the IL intrinsic expansion in VM/AOT (
getILIntrinsicImplementationForUnsafeandInternal.IL.Stubs.UnsafeIntrinsics).JulieLeeMSFT commentedon May 14, 2022
Cc @dotnet/jit-contrib.
deeprobin commentedon May 24, 2022
Is this easy for JIT-newbies?
Intrinsify more methods in Unsafe
MichalPetryka commentedon Jul 23, 2023
NI_SRCS_UNSAFE_Copy,NI_SRCS_UNSAFE_Read,NI_SRCS_UNSAFE_ReadUnaligned,NI_SRCS_UNSAFE_WriteandNI_SRCS_UNSAFE_WriteUnalignedcan be removed from the list now.