Skip to content

Commit 2f49fcf

Browse files
Remove getMaxIntrinsicSIMDVectorLength from the JIT/EE interface (#86479)
* Fixing a couple small typos * Remove getMaxIntrinsicSIMDVectorLength from the JIT/EE interface * Update src/coreclr/vm/methodtablebuilder.cpp --------- Co-authored-by: Jan Kotas <[email protected]>
1 parent 51d467a commit 2f49fcf

File tree

15 files changed

+27
-110
lines changed

15 files changed

+27
-110
lines changed

docs/design/coreclr/jit/ryujit-overview.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ The following are the key methods on this interface:
3434
It returns a pointer to the code, its size, and additional GC, EH and (optionally) debug info.
3535
* `getVersionIdentifier` is the mechanism by which the JIT/EE interface is versioned.
3636
There is a single GUID (manually generated) which the JIT and EE must agree on.
37-
* `getMaxIntrinsicSIMDVectorLength` communicates to the EE the largest SIMD vector length that the JIT can support.
38-
* `ICorJitInfo` – this is the interface that the EE implements. It has many methods defined on it that allow the JIT to
37+
* `ICorJitInfo` – this is the interface that the EE implements. It has many methods defined on it that allow the JIT to
3938
look up metadata tokens, traverse type signatures, compute field and vtable offsets, find method entry points,
4039
construct string literals, etc. This bulk of this interface is inherited from `ICorDynamicInfo` which is defined in
4140
[src/inc/corinfo.h](https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/corinfo.h). The implementation

src/coreclr/inc/corjit.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,6 @@ class ICorJitCompiler
209209
GUID* versionIdentifier /* OUT */
210210
) = 0;
211211

212-
// When the EE loads the System.Numerics.Vectors assembly, it asks the JIT what length (in bytes) of
213-
// SIMD vector it supports as an intrinsic type. Zero means that the JIT does not support SIMD
214-
// intrinsics, so the EE should use the default size (i.e. the size of the IL implementation).
215-
virtual unsigned getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags) { return 0; }
216-
217212
// Some JIT's may support multiple OSs. This api provides a means to specify to the JIT what OS it should
218213
// be trying to compile. This api does not produce any errors, any errors are to be generated by the
219214
// the compileMethod call, which will call back into the VM to ensure bits are correctly setup.
@@ -340,7 +335,7 @@ class ICorJitInfo : public ICorDynamicInfo
340335
//
341336
// SAMPLE_INTERVAL must be >= SIZE. SAMPLE_INTERVAL / SIZE
342337
// gives the average number of calls between table updates.
343-
//
338+
//
344339
struct HandleHistogram32
345340
{
346341
enum

src/coreclr/inc/jiteeversionguid.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
4343
#define GUID_DEFINED
4444
#endif // !GUID_DEFINED
4545

46-
constexpr GUID JITEEVersionIdentifier = { /* c540b287-0d17-4fc0-bac8-abd055acccb8 */
47-
0xc540b287,
48-
0x0d17,
49-
0x4fc0,
50-
{0xba, 0xc8, 0xab, 0xd0, 0x55, 0xac, 0xcc, 0xb8}
46+
constexpr GUID JITEEVersionIdentifier = { /* dfc41bc9-f134-4c50-897e-fc9304a82059 */
47+
0xdfc41bc9,
48+
0xf134,
49+
0x4c50,
50+
{0x89, 0x7e, 0xfc, 0x93, 0x04, 0xa8, 0x20, 0x59}
5151
};
5252

5353
//////////////////////////////////////////////////////////////////////////////////////////////////////////

src/coreclr/jit/compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,7 @@ void Compiler::compSetProcessor()
23042304
// Some architectures can experience frequency throttling when
23052305
// executing 512-bit width instructions. To account for this we set the
23062306
// default preferred vector width to 256-bits in some scenarios. Power
2307-
// users can override this with `DOTNET_PreferredVectorBitWith=512` to
2307+
// users can override this with `DOTNET_PreferredVectorBitWidth=512` to
23082308
// allow using such instructions where hardware support is available.
23092309

23102310
preferredVectorByteLength = 256;

src/coreclr/jit/ee_il_dll.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -314,41 +314,6 @@ void CILJit::setTargetOS(CORINFO_OS os)
314314
#endif
315315
}
316316

317-
/*****************************************************************************
318-
* Determine the maximum length of SIMD vector supported by this JIT.
319-
*/
320-
321-
unsigned CILJit::getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags)
322-
{
323-
JitFlags jitFlags;
324-
jitFlags.SetFromFlags(cpuCompileFlags);
325-
326-
#ifdef FEATURE_SIMD
327-
#if defined(TARGET_XARCH)
328-
if (!jitFlags.IsSet(JitFlags::JIT_FLAG_PREJIT) &&
329-
jitFlags.GetInstructionSetFlags().HasInstructionSet(InstructionSet_AVX2))
330-
{
331-
if (GetJitTls() != nullptr && JitTls::GetCompiler() != nullptr)
332-
{
333-
JITDUMP("getMaxIntrinsicSIMDVectorLength: returning 32\n");
334-
}
335-
return 32;
336-
}
337-
#endif // defined(TARGET_XARCH)
338-
if (GetJitTls() != nullptr && JitTls::GetCompiler() != nullptr)
339-
{
340-
JITDUMP("getMaxIntrinsicSIMDVectorLength: returning 16\n");
341-
}
342-
return 16;
343-
#else // !FEATURE_SIMD
344-
if (GetJitTls() != nullptr && JitTls::GetCompiler() != nullptr)
345-
{
346-
JITDUMP("getMaxIntrinsicSIMDVectorLength: returning 0\n");
347-
}
348-
return 0;
349-
#endif // !FEATURE_SIMD
350-
}
351-
352317
//------------------------------------------------------------------------
353318
// eeGetArgSize: Returns the number of bytes required for the given type argument
354319
// including padding after the actual value.

src/coreclr/jit/ee_il_dll.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class CILJit : public ICorJitCompiler
1717
void getVersionIdentifier(GUID* versionIdentifier /* OUT */
1818
);
1919

20-
unsigned getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags);
21-
2220
void setTargetOS(CORINFO_OS os);
2321
};
2422

src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ private static extern CorJitResult JitCompileMethod(out IntPtr exception,
148148
IntPtr jit, IntPtr thisHandle, IntPtr callbacks,
149149
ref CORINFO_METHOD_INFO info, uint flags, out IntPtr nativeEntry, out uint codeSize);
150150

151-
[DllImport(JitSupportLibrary)]
152-
private static extern uint GetMaxIntrinsicSIMDVectorLength(IntPtr jit, CORJIT_FLAGS* flags);
153-
154151
[DllImport(JitSupportLibrary)]
155152
private static extern IntPtr AllocException([MarshalAs(UnmanagedType.LPWStr)]string message, int messageLength);
156153

src/coreclr/tools/aot/jitinterface/jitwrapper.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,3 @@ DLL_EXPORT void JitProcessShutdownWork(ICorJitCompiler * pJit)
5050
{
5151
return pJit->ProcessShutdownWork(nullptr);
5252
}
53-
54-
DLL_EXPORT unsigned GetMaxIntrinsicSIMDVectorLength(
55-
ICorJitCompiler * pJit,
56-
CORJIT_FLAGS * flags)
57-
{
58-
return pJit->getMaxIntrinsicSIMDVectorLength(*flags);
59-
}

src/coreclr/tools/superpmi/superpmi-shared/icorjitcompilerimpl.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ void ProcessShutdownWork(ICorStaticInfo* info); /* {}; */
4242
void getVersionIdentifier(GUID* versionIdentifier /* OUT */
4343
);
4444

45-
// When the EE loads the System.Numerics.Vectors assembly, it asks the JIT what length (in bytes) of
46-
// SIMD vector it supports as an intrinsic type. Zero means that the JIT does not support SIMD
47-
// intrinsics, so the EE should use the default size (i.e. the size of the IL implementation).
48-
unsigned getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags); /* { return 0; } */
49-
5045
// Some JIT's may support multiple OSs. This api provides a means to specify to the JIT what OS it should
5146
// be trying to compile. This api does not produce any errors, any errors are to be generated by the
5247
// the compileMethod call, which will call back into the VM to ensure bits are correctly setup.

src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitcompiler.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,3 @@ void interceptor_ICJC::getVersionIdentifier(GUID* versionIdentifier /* OUT */)
158158
{
159159
original_ICorJitCompiler->getVersionIdentifier(versionIdentifier);
160160
}
161-
162-
unsigned interceptor_ICJC::getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags)
163-
{
164-
return original_ICorJitCompiler->getMaxIntrinsicSIMDVectorLength(cpuCompileFlags);
165-
}

0 commit comments

Comments
 (0)