Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ThunkGenerator to handle multi-nested classes #109210

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 12 additions & 62 deletions src/coreclr/inc/corinfoinstructionset.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,12 @@ enum CORINFO_InstructionSet
InstructionSet_X86Serialize_X64=57,
InstructionSet_EVEX_X64=58,
InstructionSet_AVX512F_X64=59,
InstructionSet_AVX512F_VL_X64=60,
InstructionSet_AVX512BW_X64=61,
InstructionSet_AVX512BW_VL_X64=62,
InstructionSet_AVX512CD_X64=63,
InstructionSet_AVX512CD_VL_X64=64,
InstructionSet_AVX512DQ_X64=65,
InstructionSet_AVX512DQ_VL_X64=66,
InstructionSet_AVX512VBMI_X64=67,
InstructionSet_AVX512VBMI_VL_X64=68,
InstructionSet_AVX10v1_X64=69,
InstructionSet_AVX10v1_V512_X64=70,
InstructionSet_AVX512BW_X64=60,
InstructionSet_AVX512CD_X64=61,
InstructionSet_AVX512DQ_X64=62,
InstructionSet_AVX512VBMI_X64=63,
InstructionSet_AVX10v1_X64=64,
InstructionSet_AVX10v1_V512_X64=65,
#endif // TARGET_AMD64
#ifdef TARGET_X86
InstructionSet_X86Base=1,
Expand Down Expand Up @@ -174,17 +169,12 @@ enum CORINFO_InstructionSet
InstructionSet_X86Serialize_X64=57,
InstructionSet_EVEX_X64=58,
InstructionSet_AVX512F_X64=59,
InstructionSet_AVX512F_VL_X64=60,
InstructionSet_AVX512BW_X64=61,
InstructionSet_AVX512BW_VL_X64=62,
InstructionSet_AVX512CD_X64=63,
InstructionSet_AVX512CD_VL_X64=64,
InstructionSet_AVX512DQ_X64=65,
InstructionSet_AVX512DQ_VL_X64=66,
InstructionSet_AVX512VBMI_X64=67,
InstructionSet_AVX512VBMI_VL_X64=68,
InstructionSet_AVX10v1_X64=69,
InstructionSet_AVX10v1_V512_X64=70,
InstructionSet_AVX512BW_X64=60,
InstructionSet_AVX512CD_X64=61,
InstructionSet_AVX512DQ_X64=62,
InstructionSet_AVX512VBMI_X64=63,
InstructionSet_AVX10v1_X64=64,
InstructionSet_AVX10v1_V512_X64=65,
#endif // TARGET_X86

};
Expand Down Expand Up @@ -342,24 +332,14 @@ struct CORINFO_InstructionSetFlags
AddInstructionSet(InstructionSet_EVEX_X64);
if (HasInstructionSet(InstructionSet_AVX512F))
AddInstructionSet(InstructionSet_AVX512F_X64);
if (HasInstructionSet(InstructionSet_AVX512F_VL))
AddInstructionSet(InstructionSet_AVX512F_VL_X64);
if (HasInstructionSet(InstructionSet_AVX512BW))
AddInstructionSet(InstructionSet_AVX512BW_X64);
if (HasInstructionSet(InstructionSet_AVX512BW_VL))
AddInstructionSet(InstructionSet_AVX512BW_VL_X64);
if (HasInstructionSet(InstructionSet_AVX512CD))
AddInstructionSet(InstructionSet_AVX512CD_X64);
if (HasInstructionSet(InstructionSet_AVX512CD_VL))
AddInstructionSet(InstructionSet_AVX512CD_VL_X64);
if (HasInstructionSet(InstructionSet_AVX512DQ))
AddInstructionSet(InstructionSet_AVX512DQ_X64);
if (HasInstructionSet(InstructionSet_AVX512DQ_VL))
AddInstructionSet(InstructionSet_AVX512DQ_VL_X64);
if (HasInstructionSet(InstructionSet_AVX512VBMI))
AddInstructionSet(InstructionSet_AVX512VBMI_X64);
if (HasInstructionSet(InstructionSet_AVX512VBMI_VL))
AddInstructionSet(InstructionSet_AVX512VBMI_VL_X64);
if (HasInstructionSet(InstructionSet_AVX10v1))
AddInstructionSet(InstructionSet_AVX10v1_X64);
if (HasInstructionSet(InstructionSet_AVX10v1_V512))
Expand Down Expand Up @@ -528,42 +508,22 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
resultflags.RemoveInstructionSet(InstructionSet_AVX512F);
if (resultflags.HasInstructionSet(InstructionSet_AVX512F_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
resultflags.RemoveInstructionSet(InstructionSet_AVX512F_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512BW) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512BW);
if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW))
resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL);
if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL))
resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512CD) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512CD);
if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD))
resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL);
if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL))
resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ);
if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ))
resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL))
resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI);
if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI))
resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_VL);
if (resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512VBMI_VL))
resultflags.RemoveInstructionSet(InstructionSet_AVX512VBMI_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_AVX10v1) && !resultflags.HasInstructionSet(InstructionSet_AVX10v1_X64))
resultflags.RemoveInstructionSet(InstructionSet_AVX10v1);
if (resultflags.HasInstructionSet(InstructionSet_AVX10v1_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX10v1))
Expand Down Expand Up @@ -942,40 +902,30 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet)
return "AVX512F_X64";
case InstructionSet_AVX512F_VL :
return "AVX512F_VL";
case InstructionSet_AVX512F_VL_X64 :
return "AVX512F_VL_X64";
case InstructionSet_AVX512BW :
return "AVX512BW";
case InstructionSet_AVX512BW_X64 :
return "AVX512BW_X64";
case InstructionSet_AVX512BW_VL :
return "AVX512BW_VL";
case InstructionSet_AVX512BW_VL_X64 :
return "AVX512BW_VL_X64";
case InstructionSet_AVX512CD :
return "AVX512CD";
case InstructionSet_AVX512CD_X64 :
return "AVX512CD_X64";
case InstructionSet_AVX512CD_VL :
return "AVX512CD_VL";
case InstructionSet_AVX512CD_VL_X64 :
return "AVX512CD_VL_X64";
case InstructionSet_AVX512DQ :
return "AVX512DQ";
case InstructionSet_AVX512DQ_X64 :
return "AVX512DQ_X64";
case InstructionSet_AVX512DQ_VL :
return "AVX512DQ_VL";
case InstructionSet_AVX512DQ_VL_X64 :
return "AVX512DQ_VL_X64";
case InstructionSet_AVX512VBMI :
return "AVX512VBMI";
case InstructionSet_AVX512VBMI_X64 :
return "AVX512VBMI_X64";
case InstructionSet_AVX512VBMI_VL :
return "AVX512VBMI_VL";
case InstructionSet_AVX512VBMI_VL_X64 :
return "AVX512VBMI_VL_X64";
case InstructionSet_AVX10v1 :
return "AVX10v1";
case InstructionSet_AVX10v1_X64 :
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED

constexpr GUID JITEEVersionIdentifier = { /* d0b6417d-14c1-491c-8819-339ca5c84422 */
0xd0b6417d,
0x14c1,
0x491c,
{0x88, 0x19, 0x33, 0x9c, 0xa5, 0xc8, 0x44, 0x22}
constexpr GUID JITEEVersionIdentifier = { /* 04021b93-e969-41ed-96cd-4c583673b9ab */
0x04021b93,
0xe969,
0x41ed,
{0x96, 0xcd, 0x4c, 0x58, 0x36, 0x73, 0xb9, 0xab}
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/jit/hwintrinsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,15 +825,10 @@ static const HWIntrinsicIsaRange hwintrinsicIsaRangeArray[] = {
{ NI_Illegal, NI_Illegal }, // X86Serialize_X64
{ NI_Illegal, NI_Illegal }, // EVEX_X64
{ FIRST_NI_AVX512F_X64, LAST_NI_AVX512F_X64 },
{ NI_Illegal, NI_Illegal }, // AVX512F_VL_X64
{ NI_Illegal, NI_Illegal }, // AVX512BW_X64
{ NI_Illegal, NI_Illegal }, // AVX512BW_VL_X64
{ NI_Illegal, NI_Illegal }, // AVX512CD_X64
{ NI_Illegal, NI_Illegal }, // AVX512CD_VL_X64
{ NI_Illegal, NI_Illegal }, // AVX512DQ_X64
{ NI_Illegal, NI_Illegal }, // AVX512DQ_VL_X64
{ NI_Illegal, NI_Illegal }, // AVX512VBMI_X64
{ NI_Illegal, NI_Illegal }, // AVX512VBMI_VL_X64
{ FIRST_NI_AVX10v1_X64, LAST_NI_AVX10v1_X64 },
{ NI_Illegal, NI_Illegal }, // AVX10v1_V512_X64
#elif defined (TARGET_ARM64)
Expand Down
15 changes: 0 additions & 15 deletions src/coreclr/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,14 @@ static CORINFO_InstructionSet X64VersionOfIsa(CORINFO_InstructionSet isa)
return InstructionSet_AVX2_X64;
case InstructionSet_AVX512BW:
return InstructionSet_AVX512BW_X64;
case InstructionSet_AVX512BW_VL:
return InstructionSet_AVX512BW_VL_X64;
case InstructionSet_AVX512CD:
return InstructionSet_AVX512CD_X64;
case InstructionSet_AVX512CD_VL:
return InstructionSet_AVX512CD_VL_X64;
case InstructionSet_AVX512DQ:
return InstructionSet_AVX512DQ_X64;
case InstructionSet_AVX512DQ_VL:
return InstructionSet_AVX512DQ_VL_X64;
case InstructionSet_AVX512F:
return InstructionSet_AVX512F_X64;
case InstructionSet_AVX512F_VL:
return InstructionSet_AVX512F_VL_X64;
case InstructionSet_AVX512VBMI:
return InstructionSet_AVX512VBMI_X64;
case InstructionSet_AVX512VBMI_VL:
return InstructionSet_AVX512VBMI_VL_X64;
case InstructionSet_AVX10v1:
return InstructionSet_AVX10v1_X64;
case InstructionSet_AVX10v1_V512:
Expand Down Expand Up @@ -832,23 +822,18 @@ bool HWIntrinsicInfo::isFullyImplementedIsa(CORINFO_InstructionSet isa)
case InstructionSet_AVX2_X64:
case InstructionSet_AVX512F:
case InstructionSet_AVX512F_VL:
case InstructionSet_AVX512F_VL_X64:
case InstructionSet_AVX512F_X64:
case InstructionSet_AVX512BW:
case InstructionSet_AVX512BW_VL:
case InstructionSet_AVX512BW_VL_X64:
case InstructionSet_AVX512BW_X64:
case InstructionSet_AVX512CD:
case InstructionSet_AVX512CD_VL:
case InstructionSet_AVX512CD_VL_X64:
case InstructionSet_AVX512CD_X64:
case InstructionSet_AVX512DQ:
case InstructionSet_AVX512DQ_VL:
case InstructionSet_AVX512DQ_VL_X64:
case InstructionSet_AVX512DQ_X64:
case InstructionSet_AVX512VBMI:
case InstructionSet_AVX512VBMI_VL:
case InstructionSet_AVX512VBMI_VL_X64:
case InstructionSet_AVX512VBMI_X64:
case InstructionSet_AVXVNNI:
case InstructionSet_AVXVNNI_X64:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,23 +179,18 @@ public static int FromInstructionSet(InstructionSet instructionSet)
InstructionSet.X64_AVX512F => Avx512,
InstructionSet.X64_AVX512F_X64 => Avx512,
InstructionSet.X64_AVX512F_VL => Avx512,
InstructionSet.X64_AVX512F_VL_X64 => Avx512,
InstructionSet.X64_AVX512BW => Avx512,
InstructionSet.X64_AVX512BW_X64 => Avx512,
InstructionSet.X64_AVX512BW_VL => Avx512,
InstructionSet.X64_AVX512BW_VL_X64 => Avx512,
InstructionSet.X64_AVX512CD => Avx512,
InstructionSet.X64_AVX512CD_X64 => Avx512,
InstructionSet.X64_AVX512CD_VL => Avx512,
InstructionSet.X64_AVX512CD_VL_X64 => Avx512,
InstructionSet.X64_AVX512DQ => Avx512,
InstructionSet.X64_AVX512DQ_X64 => Avx512,
InstructionSet.X64_AVX512DQ_VL => Avx512,
InstructionSet.X64_AVX512DQ_VL_X64 => Avx512,
InstructionSet.X64_AVX512VBMI => Avx512Vbmi,
InstructionSet.X64_AVX512VBMI_X64 => Avx512Vbmi,
InstructionSet.X64_AVX512VBMI_VL => Avx512Vbmi,
InstructionSet.X64_AVX512VBMI_VL_X64 => Avx512Vbmi,
InstructionSet.X64_X86Serialize => Serialize,
InstructionSet.X64_X86Serialize_X64 => Serialize,
InstructionSet.X64_AVX10v1 => Avx10v1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,18 @@ public static class ReadyToRunInstructionSetHelper
case InstructionSet.X64_AVX512F: return ReadyToRunInstructionSet.Avx512F;
case InstructionSet.X64_AVX512F_X64: return ReadyToRunInstructionSet.Avx512F;
case InstructionSet.X64_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL;
case InstructionSet.X64_AVX512F_VL_X64: return ReadyToRunInstructionSet.Avx512F_VL;
case InstructionSet.X64_AVX512BW: return ReadyToRunInstructionSet.Avx512BW;
case InstructionSet.X64_AVX512BW_X64: return ReadyToRunInstructionSet.Avx512BW;
case InstructionSet.X64_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL;
case InstructionSet.X64_AVX512BW_VL_X64: return ReadyToRunInstructionSet.Avx512BW_VL;
case InstructionSet.X64_AVX512CD: return ReadyToRunInstructionSet.Avx512CD;
case InstructionSet.X64_AVX512CD_X64: return ReadyToRunInstructionSet.Avx512CD;
case InstructionSet.X64_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL;
case InstructionSet.X64_AVX512CD_VL_X64: return ReadyToRunInstructionSet.Avx512CD_VL;
case InstructionSet.X64_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ;
case InstructionSet.X64_AVX512DQ_X64: return ReadyToRunInstructionSet.Avx512DQ;
case InstructionSet.X64_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL;
case InstructionSet.X64_AVX512DQ_VL_X64: return ReadyToRunInstructionSet.Avx512DQ_VL;
case InstructionSet.X64_AVX512VBMI: return ReadyToRunInstructionSet.Avx512Vbmi;
case InstructionSet.X64_AVX512VBMI_X64: return ReadyToRunInstructionSet.Avx512Vbmi;
case InstructionSet.X64_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
case InstructionSet.X64_AVX512VBMI_VL_X64: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
case InstructionSet.X64_AVX10v1: return ReadyToRunInstructionSet.Avx10v1;
case InstructionSet.X64_AVX10v1_X64: return ReadyToRunInstructionSet.Avx10v1;
case InstructionSet.X64_AVX10v1_V512: return ReadyToRunInstructionSet.Avx10v1_V512;
Expand Down Expand Up @@ -182,23 +177,18 @@ public static class ReadyToRunInstructionSetHelper
case InstructionSet.X86_AVX512F: return ReadyToRunInstructionSet.Avx512F;
case InstructionSet.X86_AVX512F_X64: return null;
case InstructionSet.X86_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL;
case InstructionSet.X86_AVX512F_VL_X64: return null;
case InstructionSet.X86_AVX512BW: return ReadyToRunInstructionSet.Avx512BW;
case InstructionSet.X86_AVX512BW_X64: return null;
case InstructionSet.X86_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL;
case InstructionSet.X86_AVX512BW_VL_X64: return null;
case InstructionSet.X86_AVX512CD: return ReadyToRunInstructionSet.Avx512CD;
case InstructionSet.X86_AVX512CD_X64: return null;
case InstructionSet.X86_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL;
case InstructionSet.X86_AVX512CD_VL_X64: return null;
case InstructionSet.X86_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ;
case InstructionSet.X86_AVX512DQ_X64: return null;
case InstructionSet.X86_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL;
case InstructionSet.X86_AVX512DQ_VL_X64: return null;
case InstructionSet.X86_AVX512VBMI: return ReadyToRunInstructionSet.Avx512Vbmi;
case InstructionSet.X86_AVX512VBMI_X64: return null;
case InstructionSet.X86_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
case InstructionSet.X86_AVX512VBMI_VL_X64: return null;
case InstructionSet.X86_AVX10v1: return ReadyToRunInstructionSet.Avx10v1;
case InstructionSet.X86_AVX10v1_X64: return null;
case InstructionSet.X86_AVX10v1_V512: return ReadyToRunInstructionSet.Avx10v1_V512;
Expand Down
Loading
Loading