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

Add documentation on how VN numbers memory #60476

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

SingleAccretion
Copy link
Contributor

For the past few days I've been looking into various issues related to #58312 and in the process enhancing my own understanding of VN. It took me quite the long time to fully untangle how the "map-based" numbering actually works, so I decided it would be useful to leave a (rather large) note to future readers of this code.

@dotnet/jit-contrib

@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 Oct 15, 2021
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 15, 2021
@ghost
Copy link

ghost commented Oct 15, 2021

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

Issue Details

For the past few days I've been looking into various issues related to #58312 and in the process enhancing my own understanding of VN. It took me quite the long time to fully untangle how the "map-based" numbering actually works, so I decided it would be useful to leave a (rather large) note to future readers of this code.

@dotnet/jit-contrib

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@AndyAyersMS
Copy link
Member

I did some digging to see if we could refer to any papers here. The "functional" model for the store is similar to what one sees in various abstract program analyses. But I didn't find any exact matches.

@BruceForstall seems like you originally reviewed some of Dave Detlefs' work here, do you happen to recall if there was any theoretical writeup? The changesets (circa 2012) do not mention any.

@AndyAyersMS
Copy link
Member

Looks like we do indeed have some detailed docs written when VN was first being developed, though no links to journal or conference papers.

Hopefully we can share these soon.

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.

This looks like a good start. I will try to find some time to translate the internal doc we have into markdown so we can share it.

@jakobbotsch PTAL

src/coreclr/jit/valuenum.h Outdated Show resolved Hide resolved
Co-authored-by: Andy Ayers <andya@microsoft.com>
Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for writing documentation.

@jakobbotsch jakobbotsch merged commit 7616285 into dotnet:main Oct 20, 2021
@SingleAccretion SingleAccretion deleted the VN-Docs branch October 20, 2021 10:34
@JulieLeeMSFT JulieLeeMSFT added this to the 7.0.0 milestone Nov 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 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 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.

4 participants