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

Expand the GC hole fix for explicitly initialized structs #69501

Merged
merged 2 commits into from
May 18, 2022

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented May 18, 2022

The problem fixed in #67825 applies to arbitrary "entire" struct stores.

Should fix issues seen in stress runs over at #68986.

A small number of regressions in the diffs. Seem to be cases where we now fail to dead-code a store to a local that would end up having a ref count of zero.

Liveness code already recognizes that it cannot delete certain local
stores with the implicit side effect of "explicit initialization".

However, it was only doing that for indirect "InitBlk" forms, while
the store can have more or less arbitrary shape (the only requirement
is that is must be "entire").

Fix this by not constraining the check to "InitBlk"s.
@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 18, 2022
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label May 18, 2022
@ghost
Copy link

ghost commented May 18, 2022

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

Issue Details

The problem fixed in #67825 applies to arbitrary "entire" struct stores.

Should fix issues seen in stress runs over at #68986.

We're expecting a small number of regressions in SPMI.

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down.

@AndyAyersMS
Copy link
Member

A small number of regressions...seem to be cases where we now fail to dead-code a store to a local that would end up having a ref count of zero.

If we had separate read counts vs write counts, we could improve here -- we use ref count > 1 as a proxy for "there might be a read" but if there are only writes then we simply keep all the writes around.

I have been tempted to separate out read/write counts for other reasons... perhaps it is something to put on the admittedly lengthy todo list.

@AndyAyersMS AndyAyersMS merged commit fbef29b into dotnet:main May 18, 2022
@SingleAccretion SingleAccretion deleted the Fixing-ExplicitInit-GC-Holes branch May 21, 2022 19:56
@ghost ghost locked as resolved and limited conversation to collaborators Jun 21, 2022
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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants