// *pMustExpand tells whether or not JIT must expand the intrinsic.
CorInfoIntrinsics getIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand = NULL /* OUT */);
-// Is the given module the System.Numerics.Vectors module?
-// This defaults to false.
-bool isInSIMDModule(CORINFO_CLASS_HANDLE classHnd); /* { return false; } */
+// Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
+bool isIntrinsicType(CORINFO_CLASS_HANDLE classHnd);
// return the unmanaged calling convention for a PInvoke
CorInfoUnmanagedCallConv getUnmanagedCallConv(CORINFO_METHOD_HANDLE method);
LWM(IsCompatibleDelegate, Agnostic_IsCompatibleDelegate, DD)
LWM(IsDelegateCreationAllowed, DLDL, DWORD)
LWM(IsFieldStatic, DWORDLONG, DWORD)
-LWM(IsInSIMDModule, DWORDLONG, DWORD)
+LWM(IsIntrinsicType, DWORDLONG, DWORD)
LWM(IsInstantiationOfVerifiedGeneric, DWORDLONG, DWORD)
LWM(IsSDArray, DWORDLONG, DWORD)
LWM(IsStructRequiringStackAllocRetBuf, DWORDLONG, DWORD)
return result;
}
-void MethodContext::recIsInSIMDModule(CORINFO_CLASS_HANDLE cls, BOOL result)
+void MethodContext::recIsIntrinsicType(CORINFO_CLASS_HANDLE cls, BOOL result)
{
- if (IsInSIMDModule == nullptr)
- IsInSIMDModule = new LightWeightMap<DWORDLONG, DWORD>();
+ if (IsIntrinsicType == nullptr)
+ IsIntrinsicType = new LightWeightMap<DWORDLONG, DWORD>();
- IsInSIMDModule->Add((DWORDLONG)cls, (DWORD)result);
- DEBUG_REC(dmpIsInSIMDModule((DWORDLONG)cls, (DWORD)result));
+ IsIntrinsicType->Add((DWORDLONG)cls, (DWORD)result);
+ DEBUG_REC(dmpIsIntrinsicType((DWORDLONG)cls, (DWORD)result));
}
-void MethodContext::dmpIsInSIMDModule(DWORDLONG key, DWORD value)
+void MethodContext::dmpIsIntrinsicType(DWORDLONG key, DWORD value)
{
- printf("IsInSIMDModule key mth-%016llX, value intr-%u", key, value);
+ printf("IsIntrinsicType key mth-%016llX, value intr-%u", key, value);
}
-BOOL MethodContext::repIsInSIMDModule(CORINFO_CLASS_HANDLE cls)
+BOOL MethodContext::repIsIntrinsicType(CORINFO_CLASS_HANDLE cls)
{
- AssertCodeMsg(IsInSIMDModule != nullptr, EXCEPTIONCODE_MC, "Didn't find anything for %016llX", (DWORDLONG)cls);
- AssertCodeMsg(IsInSIMDModule->GetIndex((DWORDLONG)cls) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX",
+ AssertCodeMsg(IsIntrinsicType != nullptr, EXCEPTIONCODE_MC, "Didn't find anything for %016llX", (DWORDLONG)cls);
+ AssertCodeMsg(IsIntrinsicType->GetIndex((DWORDLONG)cls) != -1, EXCEPTIONCODE_MC, "Didn't find %016llX",
(DWORDLONG)cls);
- BOOL result = (BOOL)IsInSIMDModule->Get((DWORDLONG)cls);
- DEBUG_REP(dmpIsInSIMDModule((DWORDLONG)cls, (DWORD)result));
+ BOOL result = (BOOL)IsIntrinsicType->Get((DWORDLONG)cls);
+ DEBUG_REP(dmpIsIntrinsicType((DWORDLONG)cls, (DWORD)result));
return result;
}
void dmpIsSDArray(DWORDLONG key, DWORD value);
BOOL repIsSDArray(CORINFO_CLASS_HANDLE cls);
- void recIsInSIMDModule(CORINFO_CLASS_HANDLE cls, BOOL result);
- void dmpIsInSIMDModule(DWORDLONG key, DWORD value);
- BOOL repIsInSIMDModule(CORINFO_CLASS_HANDLE cls);
+ void recIsIntrinsicType(CORINFO_CLASS_HANDLE cls, BOOL result);
+ void dmpIsIntrinsicType(DWORDLONG key, DWORD value);
+ BOOL repIsIntrinsicType(CORINFO_CLASS_HANDLE cls);
void recGetFieldClass(CORINFO_FIELD_HANDLE field, CORINFO_CLASS_HANDLE result);
void dmpGetFieldClass(DWORDLONG key, DWORDLONG value);
Packet_IsCompatibleDelegate = 99,
Packet_IsDelegateCreationAllowed = 155,
Packet_IsFieldStatic = 137, // Added 4/9/2013 - needed for 4.5.1
- Packet_IsInSIMDModule = 148, // Added 6/18/2014 - SIMD support
+ Packet_IsIntrinsicType = 148, // Added 10/26/2019 - SIMD support
Packet_IsInstantiationOfVerifiedGeneric = 100,
Packet_IsSDArray = 101,
Packet_IsStructRequiringStackAllocRetBuf = 102,
return temp;
}
-// Is the given module the System.Numerics.Vectors module?
-bool interceptor_ICJI::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+// Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
+bool interceptor_ICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- mc->cr->AddCall("isInSIMDModule");
- bool temp = original_ICorJitInfo->isInSIMDModule(classHnd);
- mc->recIsInSIMDModule(classHnd, temp);
+ mc->cr->AddCall("isIntrinsicType");
+ bool temp = original_ICorJitInfo->isIntrinsicType(classHnd);
+ mc->recIsIntrinsicType(classHnd, temp);
return temp;
}
return original_ICorJitInfo->getIntrinsicID(method, pMustExpand);
}
-// Is the given module the System.Numerics.Vectors module?
-bool interceptor_ICJI::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+// Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
+bool interceptor_ICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- mcs->AddCall("isInSIMDModule");
- return original_ICorJitInfo->isInSIMDModule(classHnd);
+ mcs->AddCall("isIntrinsicType");
+ return original_ICorJitInfo->isIntrinsicType(classHnd);
}
// return the unmanaged calling convention for a PInvoke
return original_ICorJitInfo->getIntrinsicID(method, pMustExpand);
}
-// Is the given module the System.Numerics.Vectors module?
-bool interceptor_ICJI::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+// Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
+bool interceptor_ICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- return original_ICorJitInfo->isInSIMDModule(classHnd);
+ return original_ICorJitInfo->isIntrinsicType(classHnd);
}
// return the unmanaged calling convention for a PInvoke
return jitInstance->mc->repGetIntrinsicID(method, pMustExpand);
}
-// Is the given module the System.Numerics.Vectors module?
-bool MyICJI::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+// Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
+bool MyICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- jitInstance->mc->cr->AddCall("isInSIMDModule");
- return jitInstance->mc->repIsInSIMDModule(classHnd) ? true : false;
+ jitInstance->mc->cr->AddCall("isIntrinsicType");
+ return jitInstance->mc->repIsIntrinsicType(classHnd) ? true : false;
}
// return the unmanaged calling convention for a PInvoke
#endif
#endif
-SELECTANY const GUID JITEEVersionIdentifier = { /* 1ce51eeb-dfd0-4450-ba2c-ea0d2d863df5 */
- 0x1ce51eeb,
- 0xdfd0,
- 0x4450,
- {0xba, 0x2c, 0xea, 0x0d, 0x2d, 0x86, 0x3d, 0xf5}
+SELECTANY const GUID JITEEVersionIdentifier = { /* aec2498a-ca70-408e-903e-1e6d84e90bd2 */
+ 0xaec2498a,
+ 0xca70,
+ 0x408e,
+ {0x90, 0x3e, 0x1e, 0x6d, 0x84, 0xe9, 0x0b, 0xd2}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////
bool* pMustExpand = NULL /* OUT */
) = 0;
- // Is the given module the System.Numerics.Vectors module?
+ // Is the given type in System.Private.Corelib and marked with IntrinsicAttribute?
// This defaults to false.
- virtual bool isInSIMDModule(
+ virtual bool isIntrinsicType(
CORINFO_CLASS_HANDLE classHnd
) { return false; }
DEF_CLR_API(getMethodModule)
DEF_CLR_API(getMethodVTableOffset)
DEF_CLR_API(getIntrinsicID)
-DEF_CLR_API(isInSIMDModule)
+DEF_CLR_API(isIntrinsicType)
DEF_CLR_API(getUnmanagedCallConv)
DEF_CLR_API(pInvokeMarshalingRequired)
DEF_CLR_API(satisfiesMethodConstraints)
return temp;
}
-bool WrapICorJitInfo::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+bool WrapICorJitInfo::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- API_ENTER(isInSIMDModule);
- bool temp = wrapHnd->isInSIMDModule(classHnd);
- API_LEAVE(isInSIMDModule);
+ API_ENTER(isIntrinsicType);
+ bool temp = wrapHnd->isIntrinsicType(classHnd);
+ API_LEAVE(isIntrinsicType);
return temp;
}
bool isSIMDClass(CORINFO_CLASS_HANDLE clsHnd)
{
- return info.compCompHnd->isInSIMDModule(clsHnd);
+ if (isIntrinsicType(clsHnd))
+ {
+ const char* namespaceName = nullptr;
+ (void)getClassNameFromMetadata(clsHnd, &namespaceName);
+ return strcmp(namespaceName, "System.Numerics") == 0;
+ }
+ return false;
}
bool isIntrinsicType(CORINFO_CLASS_HANDLE clsHnd)
{
- return (info.compCompHnd->getClassAttribs(clsHnd) & CORINFO_FLG_INTRINSIC_TYPE) != 0;
+ return info.compCompHnd->isIntrinsicType(clsHnd);
}
const char* getClassNameFromMetadata(CORINFO_CLASS_HANDLE cls, const char** namespaceName)
private readonly MetadataRuntimeInterfacesAlgorithm _metadataRuntimeInterfacesAlgorithm = new MetadataRuntimeInterfacesAlgorithm();
private readonly MetadataVirtualMethodAlgorithm _virtualMethodAlgorithm = new MetadataVirtualMethodAlgorithm();
- protected SimdHelper _simdHelper;
-
private MetadataStringDecoder _metadataStringDecoder;
private class ModuleData
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-
-using Internal.TypeSystem;
-
-using AssemblyName = System.Reflection.AssemblyName;
-
-namespace ILCompiler
-{
- /// <summary>
- /// Helper type that deals with System.Numerics.Vectors intrinsics.
- /// </summary>
- public struct SimdHelper
- {
- private ModuleDesc[] _simdModulesCached;
-
- public bool IsSimdType(TypeDesc type)
- {
- if (type is MetadataType metadataType)
- {
- if (_simdModulesCached == null)
- {
- InitializeSimdModules(type);
- }
-
- ModuleDesc typeModule = metadataType.Module;
- foreach (ModuleDesc simdModule in _simdModulesCached)
- if (typeModule == simdModule)
- return true;
-
- if (metadataType.IsIntrinsic)
- {
- string name = metadataType.Name;
- if (((name == "Vector") || (name == "Vector`1") || (name == "Vector2") || (name == "Vector3") || (name == "Vector4")) &&
- (metadataType.Namespace == "System.Numerics"))
- return true;
- }
- }
-
- return false;
- }
-
- private void InitializeSimdModules(TypeDesc type)
- {
- TypeSystemContext context = type.Context;
-
- ArrayBuilder<ModuleDesc> simdModules = new ArrayBuilder<ModuleDesc>();
-
- ModuleDesc module = context.ResolveAssembly(new AssemblyName("System.Numerics"), false);
- if (module != null)
- simdModules.Add(module);
-
- module = context.ResolveAssembly(new AssemblyName("System.Numerics.Vectors"), false);
- if (module != null)
- simdModules.Add(module);
-
- _simdModulesCached = simdModules.ToArray();
- }
-
- public bool IsVectorOfT(TypeDesc type)
- {
- return IsSimdType(type)
- && ((MetadataType)type).Name == "Vector`1"
- && ((MetadataType)type).Namespace == "System.Numerics";
- }
- }
-}
[UnmanagedFunctionPointerAttribute(default(CallingConvention))]
delegate CorInfoIntrinsics __getIntrinsicID(IntPtr _this, IntPtr* ppException, CORINFO_METHOD_STRUCT_* method, byte* pMustExpand);
[UnmanagedFunctionPointerAttribute(default(CallingConvention))]
- [return: MarshalAs(UnmanagedType.I1)]delegate bool __isInSIMDModule(IntPtr _this, IntPtr* ppException, CORINFO_CLASS_STRUCT_* classHnd);
+ [return: MarshalAs(UnmanagedType.I1)]delegate bool __isIntrinsicType(IntPtr _this, IntPtr* ppException, CORINFO_CLASS_STRUCT_* classHnd);
[UnmanagedFunctionPointerAttribute(default(CallingConvention))]
delegate CorInfoUnmanagedCallConv __getUnmanagedCallConv(IntPtr _this, IntPtr* ppException, CORINFO_METHOD_STRUCT_* method);
[UnmanagedFunctionPointerAttribute(default(CallingConvention))]
}
}
- [return: MarshalAs(UnmanagedType.I1)]static bool _isInSIMDModule(IntPtr thisHandle, IntPtr* ppException, CORINFO_CLASS_STRUCT_* classHnd)
+ [return: MarshalAs(UnmanagedType.I1)]static bool _isIntrinsicType(IntPtr thisHandle, IntPtr* ppException, CORINFO_CLASS_STRUCT_* classHnd)
{
var _this = GetThis(thisHandle);
try
{
- return _this.isInSIMDModule(classHnd);
+ return _this.isIntrinsicType(classHnd);
}
catch (Exception ex)
{
var d16 = new __getIntrinsicID(_getIntrinsicID);
callbacks[16] = Marshal.GetFunctionPointerForDelegate(d16);
delegates[16] = d16;
- var d17 = new __isInSIMDModule(_isInSIMDModule);
+ var d17 = new __isIntrinsicType(_isIntrinsicType);
callbacks[17] = Marshal.GetFunctionPointerForDelegate(d17);
delegates[17] = d17;
var d18 = new __getUnmanagedCallConv(_getUnmanagedCallConv);
return comparer != null ? ObjectToHandle(comparer) : null;
}
- private SimdHelper _simdHelper;
- private bool isInSIMDModule(CORINFO_CLASS_STRUCT_* classHnd)
+ private bool isIntrinsicType(CORINFO_CLASS_STRUCT_* classHnd)
{
TypeDesc type = HandleToObject(classHnd);
-
- if (_simdHelper.IsSimdType(type))
- {
-#if DEBUG
- // If this is Vector<T>, make sure the codegen and the type system agree on what instructions/registers
- // we're generating code for.
-
- CORJIT_FLAGS flags = default(CORJIT_FLAGS);
- getJitFlags(ref flags, (uint)sizeof(CORJIT_FLAGS));
-
- Debug.Assert(!_simdHelper.IsVectorOfT(type)
- || ((DefType)type).InstanceFieldSize.IsIndeterminate /* This would happen in the ReadyToRun case */
- || ((DefType)type).InstanceFieldSize.AsInt == GetMaxIntrinsicSIMDVectorLength(_jit, &flags));
-#endif
-
- return true;
- }
-
- return false;
+ return type.IsIntrinsic;
}
private CorInfoUnmanagedCallConv getUnmanagedCallConv(CORINFO_METHOD_STRUCT_* method)
CORINFO_CLASS_HANDLE getDefaultEqualityComparerClass(CORINFO_CLASS_HANDLE elemType);
void expandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_GENERICHANDLE_RESULT * pResult);
CorInfoIntrinsics getIntrinsicID( CORINFO_METHOD_HANDLE method , BoolStar pMustExpand);
- bool isInSIMDModule( CORINFO_CLASS_HANDLE classHnd );
+ bool isIntrinsicType( CORINFO_CLASS_HANDLE classHnd );
CorInfoUnmanagedCallConv getUnmanagedCallConv( CORINFO_METHOD_HANDLE method );
BOOL pInvokeMarshalingRequired( CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig );
BOOL satisfiesMethodConstraints( CORINFO_CLASS_HANDLE parent, CORINFO_METHOD_HANDLE method );
throw new NotImplementedException();
else if (type.IsRuntimeDeterminedType)
throw new NotImplementedException();
- else if (_simdHelper.IsVectorOfT(type))
+ else if (type.IsIntrinsic && (type.Name == "Vector`1") && (type.Namespace == "System.Numerics"))
{
return _vectorFieldLayoutAlgorithm;
}
<Compile Include="..\Common\Compiler\InternalCompilerErrorException.cs" Link="Compiler\InternalCompilerErrorException.cs" />
<Compile Include="..\Common\Compiler\NameMangler.cs" Link="Compiler\NameMangler.cs" />
<Compile Include="..\Common\Compiler\ReadyToRun.cs" Link="Compiler\ReadyToRun.cs" />
- <Compile Include="..\Common\Compiler\SimdHelper.cs" Link="Compiler\SimdHelper.cs" />
<Compile Include="..\Common\Compiler\SingleMethodRootProvider.cs" Link="Compiler\SingleMethodRootProvider.cs" />
<Compile Include="..\Common\Compiler\TypeExtensions.cs" Link="Compiler\TypeExtensions.cs" />
<Compile Include="..\Common\Compiler\VectorFieldLayoutAlgorithm.cs" Link="Compiler\VectorFieldLayoutAlgorithm.cs" />
void* (* getDefaultEqualityComparerClass)(void * thisHandle, CorInfoException** ppException, void* elemType);
void (* expandRawHandleIntrinsic)(void * thisHandle, CorInfoException** ppException, void* pResolvedToken, void* pResult);
int (* getIntrinsicID)(void * thisHandle, CorInfoException** ppException, void* method, bool* pMustExpand);
- bool (* isInSIMDModule)(void * thisHandle, CorInfoException** ppException, void* classHnd);
+ bool (* isIntrinsicType)(void * thisHandle, CorInfoException** ppException, void* classHnd);
int (* getUnmanagedCallConv)(void * thisHandle, CorInfoException** ppException, void* method);
int (* pInvokeMarshalingRequired)(void * thisHandle, CorInfoException** ppException, void* method, void* callSiteSig);
int (* satisfiesMethodConstraints)(void * thisHandle, CorInfoException** ppException, void* parent, void* method);
return _ret;
}
- virtual bool isInSIMDModule(void* classHnd)
+ virtual bool isIntrinsicType(void* classHnd)
{
CorInfoException* pException = nullptr;
- bool _ret = _callbacks->isInSIMDModule(_thisHandle, &pException, classHnd);
+ bool _ret = _callbacks->isIntrinsicType(_thisHandle, &pException, classHnd);
if (pException != nullptr)
throw pException;
return _ret;
uint64_t corJitFlags;
};
-static const GUID JITEEVersionIdentifier = { /* 1ce51eeb-dfd0-4450-ba2c-ea0d2d863df5 */
- 0x1ce51eeb,
- 0xdfd0,
- 0x4450,
- {0xba, 0x2c, 0xea, 0x0d, 0x2d, 0x86, 0x3d, 0xf5}
+static const GUID JITEEVersionIdentifier = { /* aec2498a-ca70-408e-903e-1e6d84e90bd2 */
+ 0xaec2498a,
+ 0xca70,
+ 0x408e,
+ {0x90, 0x3e, 0x1e, 0x6d, 0x84, 0xe9, 0x0b, 0xd2}
};
class Jit
if (!m_pManifest->IsReadyToRun())
CacheManifestExportedTypes(pamTracker);
-
- // Check for the assemblies that contain SIMD Vector types.
- // If we encounter a non-trusted assembly with these names, we will simply not recognize any of its
- // methods as intrinsics.
- LPCUTF8 assemblyName = GetSimpleName();
- const int length = sizeof("System.Numerics") - 1;
- if ((strncmp(assemblyName, "System.Numerics", length) == 0) &&
- ((assemblyName[length] == '\0') || (strcmp(assemblyName+length, ".Vectors") == 0)))
- {
- m_fIsSIMDVectorAssembly = true;
- }
- else
- {
- m_fIsSIMDVectorAssembly = false;
- }
-
// We'll load the friend assembly information lazily. For the ngen case we should avoid
// loading it entirely.
//CacheFriendAssemblyInfo();
OBJECTHANDLE GetLoaderAllocatorObjectHandle() { WRAPPER_NO_CONTRACT; return GetLoaderAllocator()->GetLoaderAllocatorObjectHandle(); }
#endif // FEATURE_COLLECTIBLE_TYPES
- BOOL IsSIMDVectorAssembly() { LIMITED_METHOD_DAC_CONTRACT; return m_fIsSIMDVectorAssembly; }
-
#if defined(FEATURE_PREJIT) || defined(FEATURE_READYTORUN)
BOOL IsInstrumented();
BOOL IsInstrumentedHelper();
BOOL m_fTerminated;
- BOOL m_fIsSIMDVectorAssembly;
-
#if defined(FEATURE_PREJIT) || defined(FEATURE_READYTORUN)
enum IsInstrumentedStatus {
IS_INSTRUMENTED_UNSET = 0,
// Check for the simd class...
assert(exactClass != NULL);
GCX_PREEMP();
- bool isSIMD = m_interpCeeInfo.isInSIMDModule(exactClass);
+ bool isIntrinsicType = m_interpCeeInfo.isIntrinsicType(exactClass);
- if (isSIMD)
+ if (isIntrinsicType)
{
// SIMD intrinsics are recognized by name.
const char* namespaceName = NULL;
const char* className = NULL;
const char* methodName = m_interpCeeInfo.getMethodNameFromMetadata((CORINFO_METHOD_HANDLE)methToCall, &className, &namespaceName, NULL);
- if (strcmp(methodName, "get_IsHardwareAccelerated") == 0)
+ if ((strcmp(methodName, "get_IsHardwareAccelerated") == 0) && (strcmp(className, "Vector") == 0) && (strcmp(namespaceName, "System.Numerics") == 0))
{
GCX_COOP();
DoSIMDHwAccelerated();
}
/*********************************************************************/
-// TODO: This method should probably be renamed to something like "isSIMDType"
-bool CEEInfo::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+bool CEEInfo::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
-CONTRACTL {
+ CONTRACTL {
NOTHROW;
GC_NOTRIGGER;
MODE_PREEMPTIVE;
TypeHandle VMClsHnd(classHnd);
PTR_MethodTable methodTable = VMClsHnd.GetMethodTable();
- if (methodTable->GetAssembly()->IsSIMDVectorAssembly())
- {
- result = true;
- }
- else if (methodTable->IsIntrinsicType())
- {
- LPCUTF8 namespaceName;
- LPCUTF8 className = methodTable->GetFullyQualifiedNameInfo(&namespaceName);
-
- if (strncmp(className, "Vector", 6) == 0)
- {
- className += 6;
+ result = methodTable->IsIntrinsicType();
- if ((className[0] == '\0') || (strcmp(className, "`1") == 0) || (strcmp(className, "2") == 0) || (strcmp(className, "3") == 0) || (strcmp(className, "4") == 0))
- {
- assert(strcmp(namespaceName, "System.Numerics") == 0);
- result = true;
- }
- }
- }
EE_TO_JIT_TRANSITION_LEAF();
-
return result;
}
CorInfoIntrinsics getIntrinsicID(CORINFO_METHOD_HANDLE method,
bool * pMustExpand = NULL);
- bool isInSIMDModule(CORINFO_CLASS_HANDLE classHnd);
+ bool isIntrinsicType(CORINFO_CLASS_HANDLE classHnd);
CorInfoUnmanagedCallConv getUnmanagedCallConv(CORINFO_METHOD_HANDLE method);
BOOL pInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig);
STANDARD_VM_CONTRACT;
#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
- if (!(GetAssembly()->IsSIMDVectorAssembly() || bmtProp->fIsIntrinsicType))
+ if (!bmtProp->fIsIntrinsicType)
return false;
if (bmtFP->NumInstanceFieldBytes != 16)
// SIMD types have [Intrinsic] attribute, for example
//
// We check this here fairly early to ensure other downstream checks on these types can be slightly more efficient.
- if (GetModule()->IsSystem() || GetAssembly()->IsSIMDVectorAssembly())
+ if (GetModule()->IsSystem())
{
HRESULT hr = GetCustomAttribute(bmtInternal->pType->GetTypeDefToken(),
WellKnownAttribute::Intrinsic,
}
// Check for methods marked as [Intrinsic]
- if (GetModule()->IsSystem() || GetAssembly()->IsSIMDVectorAssembly())
+ if (GetModule()->IsSystem())
{
if (bmtProp->fIsHardwareIntrinsic || (S_OK == GetCustomAttribute(pMethod->GetMethodSignature().GetToken(),
WellKnownAttribute::Intrinsic,
return intrinsicID;
}
-bool ZapInfo::isInSIMDModule(CORINFO_CLASS_HANDLE classHnd)
+bool ZapInfo::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
{
- return m_pEEJitInfo->isInSIMDModule(classHnd);
+ return m_pEEJitInfo->isIntrinsicType(classHnd);
}
CorInfoUnmanagedCallConv ZapInfo::getUnmanagedCallConv(CORINFO_METHOD_HANDLE method)
CorInfoIntrinsics getIntrinsicID(CORINFO_METHOD_HANDLE method,
bool * pMustExpand = NULL);
- bool isInSIMDModule(CORINFO_CLASS_HANDLE classHnd);
+ bool isIntrinsicType(CORINFO_CLASS_HANDLE classHnd);
CorInfoUnmanagedCallConv getUnmanagedCallConv(CORINFO_METHOD_HANDLE method);
BOOL pInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig);
LPVOID GetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig,