Merged
Conversation
added 9 commits
August 22, 2023 15:23
Contributor
Author
|
This PR is ready for review |
vezenovm
reviewed
Aug 25, 2023
Contributor
vezenovm
left a comment
There was a problem hiding this comment.
Nice, the documentation and code reads well. Mainly a couple nits and questions
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
TomAFrench
added a commit
that referenced
this pull request
Aug 25, 2023
* master: fix: Implement new mem2reg pass (#2420) feat(nargo): Support optional directory in git dependencies (#2436) fix(acir_gen): Pass accurate contents to slice inputs for bb func calls (#2435) fix(ssa): codegen missing check for unary minus (#2413) fix(lsp): Remove duplicated creation of lenses (#2433) feat: Add `test(should_fail)` attribute for tests that are meant to fail (#2418) chore: improve error message for InternalError (#2429) chore: Add stdlib to every crate as it is added to graph (#2392)
jfecher
pushed a commit
that referenced
this pull request
Aug 28, 2023
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Resolves #2406
Resolves #2316
Resolves #2417
Summary*
Overhauls the mem2reg pass in the SSA to handle function calls and aliases.
There are some TODOs as part of this PR - I do not plan on implementing these as part of the PR and will create issues for them tomorrow. Most notable of them is that aliases within array values are not tracked.I still need to write more documentation for this pass as well. It is missing much of the overall pass architecture documentation from the hackmd document linked in the issue. This PR is also currently missing additional test cases for the new features.Documentation
This PR requires documentation updates when merged.
Additional Context
Note that in some tests, the expected number of stores that are removed has changed. The new pass will keep each store that is still possibly used as well as the final store in each block. This is because the final store may still be needed when another block is branched to afterward.
PR Checklist*
cargo fmton default settings.