Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 4 additions & 3 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7128,9 +7128,10 @@ class Compiler
void pickGDV(GenTreeCall* call,
IL_OFFSET ilOffset,
bool isInterface,
CORINFO_CLASS_HANDLE* classGuess,
CORINFO_METHOD_HANDLE* methodGuess,
unsigned* likelihood);
CORINFO_CLASS_HANDLE* classGuesses,
CORINFO_METHOD_HANDLE* methodGuesses,
int* candidatesCount,
unsigned* likelihoods);

void considerGuardedDevirtualization(GenTreeCall* call,
IL_OFFSET ilOffset,
Expand Down
18 changes: 14 additions & 4 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12400,11 +12400,21 @@ void Compiler::gtDispTree(GenTree* tree,
printf(" (FramesRoot last use)");
}

if (((call->gtFlags & GTF_CALL_INLINE_CANDIDATE) != 0) &&
(call->GetSingleInlineCandidateInfo() != nullptr) &&
(call->GetSingleInlineCandidateInfo()->exactContextHnd != nullptr))
if ((call->gtFlags & GTF_CALL_INLINE_CANDIDATE) != 0)
{
printf(" (exactContextHnd=0x%p)", dspPtr(call->GetSingleInlineCandidateInfo()->exactContextHnd));
InlineCandidateInfo* inlineInfo;
if (call->IsGuardedDevirtualizationCandidate())
{
inlineInfo = call->GetGDVCandidateInfo(0);
}
else
{
inlineInfo = call->GetSingleInlineCandidateInfo();
}
if ((inlineInfo != nullptr) && (inlineInfo->exactContextHnd != nullptr))
{
printf(" (exactContextHnd=0x%p)", dspPtr(inlineInfo->exactContextHnd));
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are JitDump only, gtDispTree was not aware that a call might have more than a single candidate.

}

gtDispCommonEndLine(tree);
Expand Down
Loading