Skip to content

Commit dd10afe

Browse files
authored
JIT: allow inlinees with delegate invoke (#38479)
RyuJit would not inline methods that contained delegate invokes. Remove this limitation. Closes #10048. See also #37941.
1 parent 1b7edcb commit dd10afe

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/coreclr/src/jit/importer.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7620,14 +7620,6 @@ var_types Compiler::impImportCall(OPCODE opcode,
76207620
return TYP_UNDEF;
76217621
}
76227622

7623-
/* For now ignore delegate invoke */
7624-
7625-
if (mflags & CORINFO_FLG_DELEGATE_INVOKE)
7626-
{
7627-
compInlineResult->NoteFatal(InlineObservation::CALLEE_HAS_DELEGATE_INVOKE);
7628-
return TYP_UNDEF;
7629-
}
7630-
76317623
/* For now ignore varargs */
76327624
if ((sig->callConv & CORINFO_CALLCONV_MASK) == CORINFO_CALLCONV_NATIVEVARARG)
76337625
{
@@ -7984,7 +7976,6 @@ var_types Compiler::impImportCall(OPCODE opcode,
79847976

79857977
if (mflags & CORINFO_FLG_DELEGATE_INVOKE)
79867978
{
7987-
assert(!compIsForInlining());
79887979
assert(!(mflags & CORINFO_FLG_STATIC)); // can't call a static method
79897980
assert(mflags & CORINFO_FLG_FINAL);
79907981

src/coreclr/src/jit/inline.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ INLINE_OBSERVATION(BAD_ARGUMENT_NUMBER, bool, "invalid argument number",
3030
INLINE_OBSERVATION(BAD_LOCAL_NUMBER, bool, "invalid local number", FATAL, CALLEE)
3131
INLINE_OBSERVATION(COMPILATION_ERROR, bool, "compilation error", FATAL, CALLEE)
3232
INLINE_OBSERVATION(EXCEEDS_THRESHOLD, bool, "exceeds profit threshold", FATAL, CALLEE)
33-
INLINE_OBSERVATION(HAS_DELEGATE_INVOKE, bool, "delegate invoke", FATAL, CALLEE)
3433
INLINE_OBSERVATION(HAS_EH, bool, "has exception handling", FATAL, CALLEE)
3534
INLINE_OBSERVATION(HAS_ENDFILTER, bool, "has endfilter", FATAL, CALLEE)
3635
INLINE_OBSERVATION(HAS_ENDFINALLY, bool, "has endfinally", FATAL, CALLEE)

0 commit comments

Comments
 (0)