Skip to content

Add documentation on how VN numbers memory - #60476

Merged
jakobbotsch merged 2 commits into
dotnet:mainfrom
SingleAccretion:VN-Docs
Oct 20, 2021
Merged

jakobbotsch merged 2 commits into
dotnet:mainfrom
SingleAccretion:VN-Docs

Conversation

@SingleAccretion

Copy link
Copy Markdown
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

@ghost ghost added 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 labels Oct 15, 2021
@ghost

ghost commented Oct 15, 2021

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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.

@AndyAyersMS AndyAyersMS left a comment

Copy link
Copy Markdown
Member

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

Comment thread src/coreclr/jit/valuenum.h Resolved
Co-authored-by: Andy Ayers <[email protected]>

@jakobbotsch jakobbotsch left a comment

Copy link
Copy Markdown
Member

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