Skip to content

Update guarded devirtualization to handle struct returns #51138

@AndyAyersMS

Description

@AndyAyersMS

Address this workaround:

// For now, bail on transforming calls that still appear
// to return structs by value as there is deferred work
// needed to fix up the return type.
//
// See for instance fgUpdateInlineReturnExpressionPlaceHolder.
if (origCall->TypeGet() == TYP_STRUCT)
{
JITDUMP("*** %s Bailing on [%06u] -- can't handle by-value struct returns yet\n", Name(),
compiler->dspTreeID(origCall));
ClearFlag();
// For stub calls restore the stub address
if (origCall->IsVirtualStub())
{
origCall->gtStubCallStubAddr = origCall->gtInlineCandidateInfo->stubAddr;
}
return;
}

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions