Skip to content

JIT: Convert old-style intrinsics to NamedIntrinsic #52620

@EgorBo

Description

@EgorBo

Currently we have two ways of defining intrinsic functions in JIT, for better consistency + the fact that the inliner can only recognize NamedIntrinsics we should convert all of the old ones to NamedIntrinsics just like in this PR: #52156.

  • CORINFO_INTRINSIC_Array_Get
  • CORINFO_INTRINSIC_Array_Address
  • CORINFO_INTRINSIC_Array_Set
  • CORINFO_INTRINSIC_InitializeArray
  • CORINFO_INTRINSIC_RTH_GetValueInternal
  • CORINFO_INTRINSIC_Object_GetType
  • CORINFO_INTRINSIC_StubHelpers_GetStubContext
  • CORINFO_INTRINSIC_StubHelpers_GetStubContextAddr
  • CORINFO_INTRINSIC_StubHelpers_NextCallReturnAddress
  • CORINFO_INTRINSIC_InterlockedAdd32
  • CORINFO_INTRINSIC_InterlockedAdd64
  • CORINFO_INTRINSIC_InterlockedXAdd32
  • CORINFO_INTRINSIC_InterlockedXAdd64
  • CORINFO_INTRINSIC_InterlockedXchg32
  • CORINFO_INTRINSIC_InterlockedXchg64
  • CORINFO_INTRINSIC_InterlockedCmpXchg32
  • CORINFO_INTRINSIC_InterlockedCmpXchg64
  • CORINFO_INTRINSIC_MemoryBarrier
  • CORINFO_INTRINSIC_MemoryBarrierLoad
  • CORINFO_INTRINSIC_ByReference_Ctor
  • CORINFO_INTRINSIC_ByReference_Value
  • CORINFO_INTRINSIC_GetRawHandle

The most important (popular) ones are CORINFO_INTRINSIC_Object_GetType and Interlocked*

NOTE: Possible crossgen(2) issue: #52156 (comment)
NOTE2 (unrelated): We might want to implement a sort of a binary search instead of that long chain of strcmp for NamedIntrinsics

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions