Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Enable inlining for late devirtualization #110827

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/coreclr/jit/fginline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,11 @@ class SubstitutePlaceholdersAndDevirtualizeWalker : public GenTreeVisitor<Substi
isLateDevirtualization, explicitTailCall);
if (context != nullptr)
{
IL_OFFSET ilOffset = BAD_IL_OFFSET;
INDEBUG(ilOffset = call->gtRawILOffset);
#if defined(DEBUG)
IL_OFFSET ilOffset = call->gtRawILOffset;
#else
IL_OFFSET ilOffset = m_curStmt->GetDebugInfo().GetLocation().GetOffset();
hez2010 marked this conversation as resolved.
Show resolved Hide resolved
#endif // defined(DEBUG)
CORINFO_CALL_INFO callInfo = {};
callInfo.hMethod = method;
callInfo.methodFlags = methodFlags;
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/importercalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ var_types Compiler::impImportCall(OPCODE opcode,
assert((sig->callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_VARARG &&
(sig->callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_NATIVEVARARG);

call = gtNewIndCallNode(stubAddr, callRetTyp);
call = gtNewIndCallNode(stubAddr, callRetTyp, di);

call->gtFlags |= GTF_EXCEPT | (stubAddr->gtFlags & GTF_GLOB_EFFECT);
call->gtFlags |= GTF_CALL_VIRT_STUB;
Expand Down Expand Up @@ -1027,7 +1027,7 @@ var_types Compiler::impImportCall(OPCODE opcode,
if (!bIntrinsicImported)
{
// Keep track of the raw IL offset of the call
INDEBUG(call->AsCall()->gtRawILOffset = rawILOffset);
call->AsCall()->gtRawILOffset = rawILOffset;

// Is it an inline candidate?
impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, rawILOffset);
Expand Down Expand Up @@ -1237,7 +1237,7 @@ var_types Compiler::impImportCall(OPCODE opcode,
}

// Keep track of the raw IL offset of the call
INDEBUG(call->AsCall()->gtRawILOffset = rawILOffset);
call->AsCall()->gtRawILOffset = rawILOffset;

// Is it an inline candidate?
impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, rawILOffset);
Expand Down
Loading