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

Update guarded devirtualization to handle struct returns #51138

Closed
AndyAyersMS opened this issue Apr 12, 2021 · 1 comment · Fixed by #51157
Closed

Update guarded devirtualization to handle struct returns #51138

AndyAyersMS opened this issue Apr 12, 2021 · 1 comment · Fixed by #51157
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@AndyAyersMS
Copy link
Member

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;
}

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 12, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@AndyAyersMS AndyAyersMS removed the untriaged New issue has not been triaged by the area owner label Apr 12, 2021
@AndyAyersMS AndyAyersMS self-assigned this Apr 12, 2021
@AndyAyersMS AndyAyersMS added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 12, 2021
@AndyAyersMS AndyAyersMS added this to the 6.0.0 milestone Apr 12, 2021
@AndyAyersMS AndyAyersMS mentioned this issue Apr 12, 2021
54 tasks
AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this issue Apr 13, 2021
…urns

Now that we're not retyping small structs, the existing transformation works
for methods returning small structs too.

Fixes dotnet#51138.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 13, 2021
AndyAyersMS added a commit that referenced this issue Apr 13, 2021
…urns (#51157)

Now that we're not retyping small structs, the existing transformation works
for methods returning small structs too.

Fixes #51138.
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant