mirror of https://github.com/dotnet/runtime
Merge 71c7ae3213
into 02596ba8d9
This commit is contained in:
commit
81b4b94d2e
|
@ -7887,6 +7887,14 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call,
|
|||
return;
|
||||
}
|
||||
|
||||
if (call->IsUnmanaged())
|
||||
{
|
||||
// We must have IL to inline.
|
||||
//
|
||||
inlineResult->NoteFatal(InlineObservation::CALLEE_IS_UNMANAGED);
|
||||
return;
|
||||
}
|
||||
|
||||
// Inlining candidate determination needs to honor only IL tail prefix.
|
||||
// Inlining takes precedence over implicit tail call optimization (if the call is not directly recursive).
|
||||
if (call->IsTailPrefixedCall())
|
||||
|
@ -8068,6 +8076,10 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call,
|
|||
|
||||
if (methAttr & CORINFO_FLG_PINVOKE)
|
||||
{
|
||||
// We should have already ruled out cases where we can directly call the unamanged method.
|
||||
//
|
||||
assert(!call->IsUnmanaged());
|
||||
|
||||
if (!impCanPInvokeInlineCallSite(compCurBB))
|
||||
{
|
||||
inlineResult->NoteFatal(InlineObservation::CALLSITE_PINVOKE_EH);
|
||||
|
@ -8093,14 +8105,6 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call,
|
|||
inlineResult->NoteFatal(InlineObservation::CALLSITE_IS_WITHIN_FILTER);
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not inline pinvoke stubs with EH.
|
||||
//
|
||||
if ((methAttr & CORINFO_FLG_PINVOKE) != 0)
|
||||
{
|
||||
inlineResult->NoteFatal(InlineObservation::CALLEE_HAS_EH);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// The old value should be null OR this call should be a guarded devirtualization candidate.
|
||||
|
|
|
@ -42,6 +42,7 @@ INLINE_OBSERVATION(IS_ARRAY_METHOD, bool, "is array method",
|
|||
INLINE_OBSERVATION(IS_JIT_NOINLINE, bool, "noinline per JitNoinline", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(IS_NOINLINE, bool, "noinline per IL/cached result", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(IS_SYNCHRONIZED, bool, "is synchronized", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(IS_UNMANAGED, bool, "is unmanaged code", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(IS_VM_NOINLINE, bool, "noinline per VM", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(LACKS_RETURN, bool, "no return opcode", FATAL, CALLEE)
|
||||
INLINE_OBSERVATION(LDFLD_NEEDS_HELPER, bool, "ldfld needs helper", FATAL, CALLEE)
|
||||
|
|
Loading…
Reference in New Issue