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: Add a simple store-forwarding optimization for structs returned in registers #86388

Closed

Conversation

jakobbotsch
Copy link
Member

In cases where we see a primitive store into a struct that is then returned in a register we can often optimize to just return the source of the store directly. This is especially important for physical promotion that creates this pattern a lot.

…in registers

In cases where we see a primitive store into a struct that is then
returned in a register we can often optimize to just return the source
of the store directly. This is especially important for physical
promotion that creates this pattern a lot.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 17, 2023
@ghost ghost assigned jakobbotsch May 17, 2023
@ghost
Copy link

ghost commented May 17, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

In cases where we see a primitive store into a struct that is then returned in a register we can often optimize to just return the source of the store directly. This is especially important for physical promotion that creates this pattern a lot.

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

There's not much reason to take this change when the structs that are actually returned in registers are typically promoted via old promotion anyway (where it is already supported through some retyping shenanigans).

It's very visible from the diffs:

This is the kind of change we need to take if we want to invest in replacing old promotion with physical promotion entirely, but we're not quite there yet, so am going to close this.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2023
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
None yet
Development

Successfully merging this pull request may close these issues.

1 participant