diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h
index e544430fa587ba..93459c739f78e8 100644
--- a/src/coreclr/inc/clrconfigvalues.h
+++ b/src/coreclr/inc/clrconfigvalues.h
@@ -804,7 +804,6 @@ CONFIG_DWORD_INFO(INTERNAL_NestedEhOom, W("NestedEhOom"), 0, "")
#define INTERNAL_NoGuiOnAssert_Default 1
RETAIL_CONFIG_DWORD_INFO(INTERNAL_NoGuiOnAssert, W("NoGuiOnAssert"), INTERNAL_NoGuiOnAssert_Default, "")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_NoProcedureSplitting, W("NoProcedureSplitting"), 0, "")
-CONFIG_DWORD_INFO(INTERNAL_NoStringInterning, W("NoStringInterning"), 1, "Disallows string interning. I see no value in it anymore.")
CONFIG_DWORD_INFO(INTERNAL_PauseOnLoad, W("PauseOnLoad"), 0, "Stops in SystemDomain::init. I think it can be removed.")
CONFIG_DWORD_INFO(INTERNAL_PerfAllocsSizeThreshold, W("PerfAllocsSizeThreshold"), 0x3FFFFFFF, "Log facility LF_GCALLOC logs object allocations. This flag controls which ones also log stacktraces. Predates ClrProfiler.")
CONFIG_DWORD_INFO(INTERNAL_PerfNumAllocsThreshold, W("PerfNumAllocsThreshold"), 0x3FFFFFFF, "Log facility LF_GCALLOC logs object allocations. This flag controls which ones also log stacktraces. Predates ClrProfiler.")
diff --git a/src/coreclr/inc/corhdr.h b/src/coreclr/inc/corhdr.h
index 11dd7029884539..b4ea57f811ce14 100644
--- a/src/coreclr/inc/corhdr.h
+++ b/src/coreclr/inc/corhdr.h
@@ -1683,17 +1683,6 @@ typedef enum CorAttributeTargets
#define DEBUGGABLE_ATTRIBUTE_TYPE_NAME "DebuggableAttribute"
-// Keep in sync with CompilationRelaxations.cs
-typedef enum CompilationRelaxationsEnum
-{
- CompilationRelaxations_NoStringInterning = 0x0008,
-
-} CompilationRelaxationEnum;
-
-#define COMPILATIONRELAXATIONS_TYPE_W W("System.Runtime.CompilerServices.CompilationRelaxationsAttribute")
-#define COMPILATIONRELAXATIONS_TYPE "System.Runtime.CompilerServices.CompilationRelaxationsAttribute"
-
-
// Keep in sync with RuntimeCompatibilityAttribute.cs
#define RUNTIMECOMPATIBILITY_TYPE_W W("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute")
#define RUNTIMECOMPATIBILITY_TYPE "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute"
diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h
index 3bad0df909e9a6..46099e21382b54 100644
--- a/src/coreclr/inc/corinfo.h
+++ b/src/coreclr/inc/corinfo.h
@@ -928,16 +928,6 @@ enum CorInfoInline
INLINE_NEVER = -2, // This method should never be inlined, regardless of context
};
-enum CorInfoInlineRestrictions
-{
- INLINE_RESPECT_BOUNDARY = 0x00000001, // You can inline if there are no calls from the method being inlined
- INLINE_NO_CALLEE_LDSTR = 0x00000002, // You can inline only if you guarantee that if inlinee does an ldstr
- // inlinee's module will never see that string (by any means).
- // This is due to how we implement the NoStringInterningAttribute
- // (by reusing the fixup table).
- INLINE_SAME_THIS = 0x00000004, // You can inline only if the callee is on the same this reference as caller
-};
-
enum CorInfoInlineTypeCheck
{
CORINFO_INLINE_TYPECHECK_NONE = 0x00000000, // It's not okay to compare type's vtable with a native type handle
@@ -1997,9 +1987,7 @@ class ICorStaticInfo
) = 0;
// Decides if you have any limitations for inlining. If everything's OK, it will return
- // INLINE_PASS and will fill out pRestrictions with a mask of restrictions the caller of this
- // function must respect. If caller passes pRestrictions = NULL, if there are any restrictions
- // INLINE_FAIL will be returned
+ // INLINE_PASS.
//
// The callerHnd must be the immediate caller (i.e. when we have a chain of inlined calls)
//
@@ -2007,8 +1995,7 @@ class ICorStaticInfo
virtual CorInfoInline canInline (
CORINFO_METHOD_HANDLE callerHnd, /* IN */
- CORINFO_METHOD_HANDLE calleeHnd, /* IN */
- uint32_t* pRestrictions /* OUT */
+ CORINFO_METHOD_HANDLE calleeHnd /* IN */
) = 0;
// Reports whether or not a method can be inlined, and why. canInline is responsible for reporting all
diff --git a/src/coreclr/inc/icorjitinfoimpl_generated.h b/src/coreclr/inc/icorjitinfoimpl_generated.h
index 21236cc92cb17d..132707a4ef485d 100644
--- a/src/coreclr/inc/icorjitinfoimpl_generated.h
+++ b/src/coreclr/inc/icorjitinfoimpl_generated.h
@@ -42,8 +42,7 @@ bool getMethodInfo(
CorInfoInline canInline(
CORINFO_METHOD_HANDLE callerHnd,
- CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions) override;
+ CORINFO_METHOD_HANDLE calleeHnd) override;
void reportInliningDecision(
CORINFO_METHOD_HANDLE inlinerHnd,
diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h
index e7b8884419e5a6..66de16f77a0ca5 100644
--- a/src/coreclr/inc/jiteeversionguid.h
+++ b/src/coreclr/inc/jiteeversionguid.h
@@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED
-constexpr GUID JITEEVersionIdentifier = { /* 323185e9-208a-4b35-a413-23f9aac2d5f7 */
- 0x323185e9,
- 0x208a,
- 0x4b35,
- {0xa4, 0x13, 0x23, 0xf9, 0xaa, 0xc2, 0xd5, 0xf7}
+constexpr GUID JITEEVersionIdentifier = { /* ccb0c159-04b3-47f6-993e-79114c9cbef8 */
+ 0xccb0c159,
+ 0x04b3,
+ 0x47f6,
+ {0x99, 0x3e, 0x79, 0x11, 0x4c, 0x9c, 0xbe, 0xf8}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp b/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp
index 6de2cf03a26b1b..2cd1c0d4235d9a 100644
--- a/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp
+++ b/src/coreclr/jit/ICorJitInfo_API_wrapper.hpp
@@ -61,11 +61,10 @@ bool WrapICorJitInfo::getMethodInfo(
CorInfoInline WrapICorJitInfo::canInline(
CORINFO_METHOD_HANDLE callerHnd,
- CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions)
+ CORINFO_METHOD_HANDLE calleeHnd)
{
API_ENTER(canInline);
- CorInfoInline temp = wrapHnd->canInline(callerHnd, calleeHnd, pRestrictions);
+ CorInfoInline temp = wrapHnd->canInline(callerHnd, calleeHnd);
API_LEAVE(canInline);
return temp;
}
diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp
index b9cc2ff883d64a..ffc99f1efa57af 100644
--- a/src/coreclr/jit/importer.cpp
+++ b/src/coreclr/jit/importer.cpp
@@ -8645,9 +8645,6 @@ var_types Compiler::impImportCall(OPCODE opcode,
opcodeNames[opcode], callInfo->kind, varTypeName(callRetTyp), structSize);
}
#endif
- // This should be checked in impImportBlockCode.
- assert(!compIsForInlining() || !(impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_RESPECT_BOUNDARY));
-
sig = &calliSig;
}
else // (opcode != CEE_CALLI)
@@ -8677,14 +8674,6 @@ var_types Compiler::impImportCall(OPCODE opcode,
#endif
if (compIsForInlining())
{
- /* Does this call site have security boundary restrictions? */
-
- if (impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_RESPECT_BOUNDARY)
- {
- compInlineResult->NoteFatal(InlineObservation::CALLSITE_CROSS_BOUNDARY_SECURITY);
- return TYP_UNDEF;
- }
-
/* Does the inlinee use StackCrawlMark */
if (mflags & CORINFO_FLG_DONT_INLINE_CALLER)
@@ -12216,20 +12205,9 @@ void Compiler::impImportBlockCode(BasicBlock* block)
break;
case CEE_LDSTR:
-
- if (compIsForInlining())
- {
- if (impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_NO_CALLEE_LDSTR)
- {
- compInlineResult->NoteFatal(InlineObservation::CALLSITE_HAS_LDSTR_RESTRICTION);
- return;
- }
- }
-
val = getU4LittleEndian(codeAddr);
JITDUMP(" %08X", val);
impPushOnStack(gtNewSconNode(val, info.compScopeHnd), tiRetVal);
-
break;
case CEE_LDARG:
@@ -14460,16 +14438,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
eeGetCallInfo(&resolvedToken, nullptr /* constraint typeRef*/,
combine(CORINFO_CALLINFO_SECURITYCHECKS, CORINFO_CALLINFO_ALLOWINSTPARAM), &callInfo);
- if (compIsForInlining())
- {
- if (impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_RESPECT_BOUNDARY)
- {
- // Check to see if this call violates the boundary.
- compInlineResult->NoteFatal(InlineObservation::CALLSITE_CROSS_BOUNDARY_SECURITY);
- return;
- }
- }
-
mflags = callInfo.methodFlags;
if ((mflags & (CORINFO_FLG_STATIC | CORINFO_FLG_ABSTRACT)) != 0)
@@ -14659,16 +14627,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
/* CALLI does not respond to CONSTRAINED */
prefixFlags &= ~PREFIX_CONSTRAINED;
- if (compIsForInlining())
- {
- // CALLI doesn't have a method handle, so assume the worst.
- if (impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_RESPECT_BOUNDARY)
- {
- compInlineResult->NoteFatal(InlineObservation::CALLSITE_CROSS_BOUNDARY_CALLI);
- return;
- }
- }
-
FALLTHROUGH;
case CEE_CALLVIRT:
@@ -19063,7 +19021,6 @@ void Compiler::impCheckCanInline(GenTreeCall* call,
bool success = eeRunWithErrorTrap(
[](Param* pParam) {
- uint32_t dwRestrictions = 0;
CorInfoInitClassResult initClassResult;
#ifdef DEBUG
@@ -19119,8 +19076,7 @@ void Compiler::impCheckCanInline(GenTreeCall* call,
/* VM Inline check also ensures that the method is verifiable if needed */
CorInfoInline vmResult;
- vmResult = pParam->pThis->info.compCompHnd->canInline(pParam->pThis->info.compMethodHnd, pParam->fncHandle,
- &dwRestrictions);
+ vmResult = pParam->pThis->info.compCompHnd->canInline(pParam->pThis->info.compMethodHnd, pParam->fncHandle);
if (vmResult == INLINE_FAIL)
{
@@ -19138,21 +19094,6 @@ void Compiler::impCheckCanInline(GenTreeCall* call,
goto _exit;
}
- // check for unsupported inlining restrictions
- assert((dwRestrictions & ~(INLINE_RESPECT_BOUNDARY | INLINE_NO_CALLEE_LDSTR | INLINE_SAME_THIS)) == 0);
-
- if (dwRestrictions & INLINE_SAME_THIS)
- {
- GenTree* thisArg = pParam->call->AsCall()->gtCallThisArg->GetNode();
- assert(thisArg);
-
- if (!pParam->pThis->impIsThis(thisArg))
- {
- pParam->result->NoteFatal(InlineObservation::CALLSITE_REQUIRES_SAME_THIS);
- goto _exit;
- }
- }
-
/* Get the method properties */
CORINFO_CLASS_HANDLE clsHandle;
@@ -19204,7 +19145,6 @@ void Compiler::impCheckCanInline(GenTreeCall* call,
pInfo->clsHandle = clsHandle;
pInfo->exactContextHnd = pParam->exactContextHnd;
pInfo->retExpr = nullptr;
- pInfo->dwRestrictions = dwRestrictions;
pInfo->preexistingSpillTemp = BAD_VAR_NUM;
pInfo->clsAttr = clsAttr;
pInfo->methAttr = pParam->methAttr;
diff --git a/src/coreclr/jit/inline.def b/src/coreclr/jit/inline.def
index a519471a3caec2..a4f84552edd98d 100644
--- a/src/coreclr/jit/inline.def
+++ b/src/coreclr/jit/inline.def
@@ -132,14 +132,11 @@ INLINE_OBSERVATION(CANT_EMBED_VARARGS_COOKIE, bool, "can't embed varargs cooki
INLINE_OBSERVATION(CANT_CLASS_INIT, bool, "can't class init", FATAL, CALLSITE)
INLINE_OBSERVATION(COMPILATION_ERROR, bool, "compilation error", FATAL, CALLSITE)
INLINE_OBSERVATION(COMPILATION_FAILURE, bool, "failed to compile", FATAL, CALLSITE)
-INLINE_OBSERVATION(CROSS_BOUNDARY_CALLI, bool, "cross-boundary calli", FATAL, CALLSITE)
-INLINE_OBSERVATION(CROSS_BOUNDARY_SECURITY, bool, "cross-boundary security check", FATAL, CALLSITE)
INLINE_OBSERVATION(EXCEEDS_THRESHOLD, bool, "exceeds profit threshold", FATAL, CALLSITE)
INLINE_OBSERVATION(EXPLICIT_TAIL_PREFIX, bool, "explicit tail prefix", FATAL, CALLSITE)
INLINE_OBSERVATION(GENERIC_DICTIONARY_LOOKUP, bool, "runtime dictionary lookup", FATAL, CALLSITE)
INLINE_OBSERVATION(HAS_CALL_VIA_LDVIRTFTN, bool, "call via ldvirtftn", FATAL, CALLSITE)
INLINE_OBSERVATION(HAS_COMPLEX_HANDLE, bool, "complex handle access", FATAL, CALLSITE)
-INLINE_OBSERVATION(HAS_LDSTR_RESTRICTION, bool, "has ldstr VM restriction", FATAL, CALLSITE)
INLINE_OBSERVATION(IMPLICIT_REC_TAIL_CALL, bool, "implicit recursive tail call", FATAL, CALLSITE)
INLINE_OBSERVATION(IS_CALL_TO_HELPER, bool, "target is helper", FATAL, CALLSITE)
INLINE_OBSERVATION(IS_NOT_DIRECT, bool, "target not direct", FATAL, CALLSITE)
@@ -162,7 +159,6 @@ INLINE_OBSERVATION(OVER_BUDGET, bool, "inline exceeds budget",
INLINE_OBSERVATION(OVER_INLINE_LIMIT, bool, "limited by JitInlineLimit", FATAL, CALLSITE)
INLINE_OBSERVATION(PIN_IN_TRY_REGION, bool, "within try region, pinned", FATAL, CALLSITE)
INLINE_OBSERVATION(RANDOM_REJECT, bool, "random reject", FATAL, CALLSITE)
-INLINE_OBSERVATION(REQUIRES_SAME_THIS, bool, "requires same this", FATAL, CALLSITE)
INLINE_OBSERVATION(RETURN_TYPE_MISMATCH, bool, "return type mismatch", FATAL, CALLSITE)
INLINE_OBSERVATION(STFLD_NEEDS_HELPER, bool, "stfld needs helper", FATAL, CALLSITE)
INLINE_OBSERVATION(TOO_MANY_LOCALS, bool, "too many locals", FATAL, CALLSITE)
diff --git a/src/coreclr/jit/inline.h b/src/coreclr/jit/inline.h
index 9eacfb34a15138..7182bdf78fa92a 100644
--- a/src/coreclr/jit/inline.h
+++ b/src/coreclr/jit/inline.h
@@ -581,7 +581,6 @@ struct InlineCandidateInfo : public GuardedDevirtualizationCandidateInfo
CORINFO_CLASS_HANDLE clsHandle;
CORINFO_CONTEXT_HANDLE exactContextHnd;
GenTree* retExpr;
- DWORD dwRestrictions;
unsigned preexistingSpillTemp;
unsigned clsAttr;
unsigned methAttr;
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoBase.cs b/src/coreclr/tools/Common/JitInterface/CorInfoBase.cs
index 006409bdbb5338..858afde75164e2 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoBase.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoBase.cs
@@ -86,12 +86,12 @@ static byte _getMethodInfo(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHO
}
[UnmanagedCallersOnly]
- static CorInfoInline _canInline(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, uint* pRestrictions)
+ static CorInfoInline _canInline(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd)
{
var _this = GetThis(thisHandle);
try
{
- return _this.canInline(callerHnd, calleeHnd, ref *pRestrictions);
+ return _this.canInline(callerHnd, calleeHnd);
}
catch (Exception ex)
{
@@ -2559,7 +2559,7 @@ static IntPtr GetUnmanagedCallbacks()
callbacks[2] = (delegate* unmanaged)&_setMethodAttribs;
callbacks[3] = (delegate* unmanaged)&_getMethodSig;
callbacks[4] = (delegate* unmanaged)&_getMethodInfo;
- callbacks[5] = (delegate* unmanaged)&_canInline;
+ callbacks[5] = (delegate* unmanaged)&_canInline;
callbacks[6] = (delegate* unmanaged)&_reportInliningDecision;
callbacks[7] = (delegate* unmanaged)&_canTailCall;
callbacks[8] = (delegate* unmanaged)&_reportTailCallDecision;
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
index cd464db7955341..41c4663ed720e2 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
@@ -1159,7 +1159,7 @@ private bool getMethodInfo(CORINFO_METHOD_STRUCT_* ftn, CORINFO_METHOD_INFO* inf
return Get_CORINFO_METHOD_INFO(method, methodIL, info);
}
- private CorInfoInline canInline(CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd, ref uint pRestrictions)
+ private CorInfoInline canInline(CORINFO_METHOD_STRUCT_* callerHnd, CORINFO_METHOD_STRUCT_* calleeHnd)
{
MethodDesc callerMethod = HandleToObject(callerHnd);
MethodDesc calleeMethod = HandleToObject(calleeHnd);
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
index 4a7d254d583fcf..3e348263103855 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
@@ -498,16 +498,6 @@ public enum CorInfoInlineTypeCheckSource
CORINFO_INLINE_TYPECHECK_SOURCE_TOKEN = 0x00000001, // Type handle comes from an ldtoken
}
- public enum CorInfoInlineRestrictions
- {
- INLINE_RESPECT_BOUNDARY = 0x00000001, // You can inline if there are no calls from the method being inlined
- INLINE_NO_CALLEE_LDSTR = 0x00000002, // You can inline only if you guarantee that if inlinee does an ldstr
- // inlinee's module will never see that string (by any means).
- // This is due to how we implement the NoStringInterningAttribute
- // (by reusing the fixup table).
- INLINE_SAME_THIS = 0x00000004, // You can inline only if the callee is on the same this reference as caller
- }
-
// If you add more values here, keep it in sync with TailCallTypeMap in ..\vm\ClrEtwAll.man
// and the string enum in CEEInfo::reportTailCallDecision in ..\vm\JITInterface.cpp
public enum CorInfoTailCall
diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt
index 92bc30aaf2570b..7cccae04c4151c 100644
--- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt
+++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt
@@ -158,7 +158,7 @@ FUNCTIONS
void setMethodAttribs( CORINFO_METHOD_HANDLE ftn, CorInfoMethodRuntimeFlags attribs );
void getMethodSig( CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO *sig, CORINFO_CLASS_HANDLE memberParent );
bool getMethodInfo( CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info );
- CorInfoInline canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, uint32_t* pRestrictions );
+ CorInfoInline canInline( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd);
void reportInliningDecision(CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char * reason);
bool canTailCall( CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE declaredCalleeHnd, CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix );
void reportTailCallDecision(CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, CorInfoTailCall tailCallResult, const char * reason);
diff --git a/src/coreclr/tools/aot/jitinterface/jitinterface.h b/src/coreclr/tools/aot/jitinterface/jitinterface.h
index 14286588063b23..9f802bdb461836 100644
--- a/src/coreclr/tools/aot/jitinterface/jitinterface.h
+++ b/src/coreclr/tools/aot/jitinterface/jitinterface.h
@@ -16,7 +16,7 @@ struct JitInterfaceCallbacks
void (* setMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CorInfoMethodRuntimeFlags attribs);
void (* getMethodSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_HANDLE memberParent);
bool (* getMethodInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info);
- CorInfoInline (* canInline)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, uint32_t* pRestrictions);
+ CorInfoInline (* canInline)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd);
void (* reportInliningDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char* reason);
bool (* canTailCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE declaredCalleeHnd, CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix);
void (* reportTailCallDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, CorInfoTailCall tailCallResult, const char* reason);
@@ -247,11 +247,10 @@ class JitInterfaceWrapper : public ICorJitInfo
virtual CorInfoInline canInline(
CORINFO_METHOD_HANDLE callerHnd,
- CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions)
+ CORINFO_METHOD_HANDLE calleeHnd)
{
CorInfoExceptionClass* pException = nullptr;
- CorInfoInline temp = _callbacks->canInline(_thisHandle, &pException, callerHnd, calleeHnd, pRestrictions);
+ CorInfoInline temp = _callbacks->canInline(_thisHandle, &pException, callerHnd, calleeHnd);
if (pException != nullptr) throw pException;
return temp;
}
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h b/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
index fd2a35093c7dec..1cd8a06b0aa277 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
@@ -66,7 +66,6 @@ struct DLDL
struct Agnostic_CanInline
{
- DWORD Restrictions;
DWORD result;
DWORD exceptionCode;
};
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
index ab8717dae42e80..21526c49fb5f4d 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
@@ -1293,7 +1293,6 @@ LPCWSTR MethodContext::repGetJitTimeLogFilename()
void MethodContext::recCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions,
CorInfoInline response,
DWORD exceptionCode)
{
@@ -1306,10 +1305,6 @@ void MethodContext::recCanInline(CORINFO_METHOD_HANDLE callerHnd,
key.B = CastHandle(calleeHnd);
Agnostic_CanInline value;
- if (pRestrictions != nullptr)
- value.Restrictions = (DWORD)*pRestrictions;
- else
- value.Restrictions = (DWORD)0;
value.result = (DWORD)response;
value.exceptionCode = (DWORD)exceptionCode;
@@ -1318,12 +1313,11 @@ void MethodContext::recCanInline(CORINFO_METHOD_HANDLE callerHnd,
}
void MethodContext::dmpCanInline(DLDL key, const Agnostic_CanInline& value)
{
- printf("CanInline key - callerHnd-%016llX calleeHnd-%016llX, value pRestrictions-%u result-%u exceptionCode-%08X",
- key.A, key.B, value.Restrictions, value.result, value.exceptionCode);
+ printf("CanInline key - callerHnd-%016llX calleeHnd-%016llX, value result-%u exceptionCode-%08X",
+ key.A, key.B, value.result, value.exceptionCode);
}
CorInfoInline MethodContext::repCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions,
DWORD* exceptionCode)
{
DLDL key;
@@ -1347,8 +1341,6 @@ CorInfoInline MethodContext::repCanInline(CORINFO_METHOD_HANDLE callerHnd,
*exceptionCode = value.exceptionCode;
- if (pRestrictions != nullptr)
- *pRestrictions = (DWORD)value.Restrictions;
CorInfoInline response = (CorInfoInline)value.result;
return response;
}
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
index d18c531dd86483..dc2e733e343fe7 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
@@ -193,13 +193,11 @@ class MethodContext
void recCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions,
CorInfoInline response,
DWORD exceptionCode);
void dmpCanInline(DLDL key, const Agnostic_CanInline& value);
CorInfoInline repCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions,
DWORD* exceptionCode);
void recResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken, DWORD exceptionCode);
diff --git a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
index 061d3d6a77b927..f347a616f96f4c 100644
--- a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
@@ -89,17 +89,14 @@ bool interceptor_ICJI::getMethodInfo(CORINFO_METHOD_HANDLE ftn, /* IN */
}
// Decides if you have any limitations for inlining. If everything's OK, it will return
-// INLINE_PASS and will fill out pRestrictions with a mask of restrictions the caller of this
-// function must respect. If caller passes pRestrictions = nullptr, if there are any restrictions
-// INLINE_FAIL will be returned
+// INLINE_PASS.
//
// The callerHnd must be the immediate caller (i.e. when we have a chain of inlined calls)
//
// The inlined method need not be verified
CorInfoInline interceptor_ICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /* IN */
- CORINFO_METHOD_HANDLE calleeHnd, /* IN */
- uint32_t* pRestrictions /* OUT */
+ CORINFO_METHOD_HANDLE calleeHnd /* IN */
)
{
CorInfoInline temp = INLINE_NEVER;
@@ -108,11 +105,11 @@ CorInfoInline interceptor_ICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /*
[&]()
{
mc->cr->AddCall("canInline");
- temp = original_ICorJitInfo->canInline(callerHnd, calleeHnd, pRestrictions);
+ temp = original_ICorJitInfo->canInline(callerHnd, calleeHnd);
},
[&](DWORD exceptionCode)
{
- this->mc->recCanInline(callerHnd, calleeHnd, pRestrictions, temp, exceptionCode);
+ this->mc->recCanInline(callerHnd, calleeHnd, temp, exceptionCode);
});
return temp;
diff --git a/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp
index 657575cce71fe3..66f792968885d8 100644
--- a/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp
@@ -53,11 +53,10 @@ bool interceptor_ICJI::getMethodInfo(
CorInfoInline interceptor_ICJI::canInline(
CORINFO_METHOD_HANDLE callerHnd,
- CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions)
+ CORINFO_METHOD_HANDLE calleeHnd)
{
mcs->AddCall("canInline");
- return original_ICorJitInfo->canInline(callerHnd, calleeHnd, pRestrictions);
+ return original_ICorJitInfo->canInline(callerHnd, calleeHnd);
}
void interceptor_ICJI::reportInliningDecision(
diff --git a/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp
index 294750ccde5c1a..cd38c2c7759390 100644
--- a/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp
@@ -48,10 +48,9 @@ bool interceptor_ICJI::getMethodInfo(
CorInfoInline interceptor_ICJI::canInline(
CORINFO_METHOD_HANDLE callerHnd,
- CORINFO_METHOD_HANDLE calleeHnd,
- uint32_t* pRestrictions)
+ CORINFO_METHOD_HANDLE calleeHnd)
{
- return original_ICorJitInfo->canInline(callerHnd, calleeHnd, pRestrictions);
+ return original_ICorJitInfo->canInline(callerHnd, calleeHnd);
}
void interceptor_ICJI::reportInliningDecision(
diff --git a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
index 16c66a6a398476..d90f0b5e097068 100644
--- a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
@@ -81,23 +81,20 @@ bool MyICJI::getMethodInfo(CORINFO_METHOD_HANDLE ftn, /* IN */
}
// Decides if you have any limitations for inlining. If everything's OK, it will return
-// INLINE_PASS and will fill out pRestrictions with a mask of restrictions the caller of this
-// function must respect. If caller passes pRestrictions = nullptr, if there are any restrictions
-// INLINE_FAIL will be returned
+// INLINE_PASS.
//
// The callerHnd must be the immediate caller (i.e. when we have a chain of inlined calls)
//
// The inlined method need not be verified
CorInfoInline MyICJI::canInline(CORINFO_METHOD_HANDLE callerHnd, /* IN */
- CORINFO_METHOD_HANDLE calleeHnd, /* IN */
- uint32_t* pRestrictions /* OUT */
+ CORINFO_METHOD_HANDLE calleeHnd /* IN */
)
{
jitInstance->mc->cr->AddCall("canInline");
DWORD exceptionCode = 0;
- CorInfoInline result = jitInstance->mc->repCanInline(callerHnd, calleeHnd, pRestrictions, &exceptionCode);
+ CorInfoInline result = jitInstance->mc->repCanInline(callerHnd, calleeHnd, &exceptionCode);
if (exceptionCode != 0)
ThrowException(exceptionCode);
return result;
diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp
index c25b7aa19cc9d1..f1fde6228b051a 100644
--- a/src/coreclr/vm/ceeload.cpp
+++ b/src/coreclr/vm/ceeload.cpp
@@ -1596,75 +1596,6 @@ InstrumentedILOffsetMapping Module::GetInstrumentedILOffsetMapping(mdMethodDef t
#ifndef DACCESS_COMPILE
-
-BOOL Module::IsNoStringInterning()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- }
- CONTRACTL_END
-
- if (!(m_dwPersistedFlags & COMPUTED_STRING_INTERNING))
- {
- // Default is string interning
- BOOL fNoStringInterning = FALSE;
-
- HRESULT hr;
-
- IMDInternalImport *mdImport = GetAssembly()->GetMDImport();
- _ASSERTE(mdImport);
-
- mdToken token;
- IfFailThrow(mdImport->GetAssemblyFromScope(&token));
-
- const BYTE *pVal;
- ULONG cbVal;
-
- hr = mdImport->GetCustomAttributeByName(token,
- COMPILATIONRELAXATIONS_TYPE,
- (const void**)&pVal, &cbVal);
-
- // Parse the attribute
- if (hr == S_OK)
- {
- CustomAttributeParser cap(pVal, cbVal);
- IfFailThrow(cap.SkipProlog());
-
- // Get Flags
- UINT32 flags;
- IfFailThrow(cap.GetU4(&flags));
-
- if (flags & CompilationRelaxations_NoStringInterning)
- {
- fNoStringInterning = TRUE;
- }
- }
-
-#ifdef _DEBUG
- static ConfigDWORD g_NoStringInterning;
- DWORD dwOverride = g_NoStringInterning.val(CLRConfig::INTERNAL_NoStringInterning);
-
- if (dwOverride == 0)
- {
- // Disabled
- fNoStringInterning = FALSE;
- }
- else if (dwOverride == 2)
- {
- // Always true (testing)
- fNoStringInterning = TRUE;
- }
-#endif // _DEBUG
-
- FastInterlockOr(&m_dwPersistedFlags, COMPUTED_STRING_INTERNING |
- (fNoStringInterning ? NO_STRING_INTERNING : 0));
- }
-
- return !!(m_dwPersistedFlags & NO_STRING_INTERNING);
-}
-
BOOL Module::HasDefaultDllImportSearchPathsAttribute()
{
CONTRACTL
@@ -3102,7 +3033,7 @@ void Module::InitializeStringData(DWORD token, EEStringData *pstrData, CQuickByt
}
-OBJECTHANDLE Module::ResolveStringRef(DWORD token, BaseDomain *pDomain, bool bNeedToSyncWithFixups)
+OBJECTHANDLE Module::ResolveStringRef(DWORD token, BaseDomain *pDomain)
{
CONTRACTL
{
diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h
index d9cd6742cb6c0e..a97be226fb9fba 100644
--- a/src/coreclr/vm/ceeload.h
+++ b/src/coreclr/vm/ceeload.h
@@ -805,9 +805,8 @@ class Module
// unused = 0x00000001,
COMPUTED_GLOBAL_CLASS = 0x00000002,
- // This flag applies to assembly, but it is stored so it can be cached in ngen image
- COMPUTED_STRING_INTERNING = 0x00000004,
- NO_STRING_INTERNING = 0x00000008,
+ // unused = 0x00000004,
+ // unused = 0x00000008,
// This flag applies to assembly, but it is stored so it can be cached in ngen image
COMPUTED_WRAP_EXCEPTIONS = 0x00000010,
@@ -1400,7 +1399,7 @@ class Module
void InitializeStringData(DWORD token, EEStringData *pstrData, CQuickBytes *pqb);
// Resolving
- OBJECTHANDLE ResolveStringRef(DWORD Token, BaseDomain *pDomain, bool bNeedToSyncWithFixups);
+ OBJECTHANDLE ResolveStringRef(DWORD Token, BaseDomain *pDomain);
CHECK CheckStringRef(RVA rva);
@@ -2024,13 +2023,6 @@ class Module
public:
- //-----------------------------------------------------------------------------------------
- // If true, strings only need to be interned at a per module basis, instead of at a
- // per appdomain basis, which is the default. Use the module accessor so you don't need
- // to touch the metadata in the ngen case
- //-----------------------------------------------------------------------------------------
- BOOL IsNoStringInterning();
-
//-----------------------------------------------------------------------------------------
// Returns a BOOL to indicate if we have computed whether compiler has instructed us to
// wrap the non-CLS compliant exceptions or not.
diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp
index 27d2452491e2a1..cd8ab0933e9229 100644
--- a/src/coreclr/vm/jithelpers.cpp
+++ b/src/coreclr/vm/jithelpers.cpp
@@ -2433,7 +2433,7 @@ OBJECTHANDLE ConstructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd, mdToken meta
_ASSERTE(TypeFromToken(metaTok) == mdtString);
Module* module = GetModule(scopeHnd);
- return module->ResolveStringRef(metaTok, module->GetAssembly()->Parent(), false);
+ return module->ResolveStringRef(metaTok, module->GetAssembly()->Parent());
}
/*********************************************************************/
diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp
index 7c298b847400e4..69a0abdfcb1efb 100644
--- a/src/coreclr/vm/jitinterface.cpp
+++ b/src/coreclr/vm/jitinterface.cpp
@@ -7523,8 +7523,7 @@ bool containsStackCrawlMarkLocal(MethodDesc* ftn)
*************************************************************/
CorInfoInline CEEInfo::canInline (CORINFO_METHOD_HANDLE hCaller,
- CORINFO_METHOD_HANDLE hCallee,
- uint32_t* pRestrictions)
+ CORINFO_METHOD_HANDLE hCallee)
{
CONTRACTL {
THROWS;
@@ -7534,7 +7533,6 @@ CorInfoInline CEEInfo::canInline (CORINFO_METHOD_HANDLE hCaller,
CorInfoInline result = INLINE_PASS; // By default we pass.
// Do not set pass in the rest of the method.
- DWORD dwRestrictions = 0; // By default, no restrictions
const char * szFailReason = NULL; // for reportInlineDecision
JIT_TO_EE_TRANSITION();
@@ -7609,23 +7607,6 @@ CorInfoInline CEEInfo::canInline (CORINFO_METHOD_HANDLE hCaller,
}
}
- //
- // Perform the Cross-Assembly inlining checks
- //
- {
- Module * pCalleeModule = pCallee->GetModule();
-
- // TODO: We can probably be smarter here if the caller is jitted, as we will
- // know for sure if the inlinee has really no string interning active (currently
- // it's only on in the ngen case (besides requiring the attribute)), but this is getting
- // too subtle. Will only do if somebody screams about it, as bugs here are going to
- // be tough to find
- if ((pOrigCallerModule != pCalleeModule) && pCalleeModule->IsNoStringInterning())
- {
- dwRestrictions |= INLINE_NO_CALLEE_LDSTR;
- }
- }
-
#ifdef PROFILING_SUPPORTED
if (CORProfilerPresent())
{
@@ -7699,28 +7680,6 @@ exit: ;
EE_TO_JIT_TRANSITION();
- if (result == INLINE_PASS && dwRestrictions)
- {
- if (pRestrictions)
- {
- *pRestrictions = dwRestrictions;
- }
- else
- {
- // If the jitter didn't want to know about restrictions, it shouldn't be inlining
- result = INLINE_FAIL;
- szFailReason = "Inlinee has restrictions the JIT doesn't want";
- }
- }
- else
- {
- if (pRestrictions)
- {
- // Denied inlining, makes no sense to pass out restrictions,
- *pRestrictions = 0;
- }
- }
-
if (dontInline(result))
{
// If you hit this assert, it means you added a new way to prevent inlining
@@ -13186,12 +13145,7 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,
return TRUE;
}
- // For generic instantiations compiled into the ngen image of some other
- // client assembly, we need to ensure that we intern the string
- // in the defining assembly.
- bool mayNeedToSyncWithFixups = pInfoModule != currentModule;
-
- result = (size_t) pInfoModule->ResolveStringRef(TokenFromRid(rid, mdtString), currentModule->GetDomain(), mayNeedToSyncWithFixups);
+ result = (size_t) pInfoModule->ResolveStringRef(TokenFromRid(rid, mdtString), currentModule->GetDomain());
}
}
break;