-
Notifications
You must be signed in to change notification settings - Fork 207
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
chore(ssa refactor): Add DenseMap and SparseMap types #1184
Merged
Conversation
This file contains 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
I figure I'll break the SSA changes into small PRs like this one when possible since the inevitable ssa-gen pass will be a larger PR. |
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
kevaundray
reviewed
Apr 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments -- removing the cast instruction seems unrelated to this PR though
Related to #1118 |
Co-authored-by: kevaundray <[email protected]>
Co-authored-by: kevaundray <[email protected]>
Co-authored-by: kevaundray <[email protected]>
kevaundray
previously approved these changes
Apr 20, 2023
kevaundray
approved these changes
Apr 20, 2023
TomAFrench
added a commit
that referenced
this pull request
Apr 24, 2023
* master: chore: update flake version to match current release (#1204) feat!: Switch to aztec_backend that uses upstream BB & UltraPlonk (#1114) chore(ssa refactor): Add Context structs and start ssa gen pass (#1196) chore(ssa): Replace JmpIf with BrIf (#1193) chore(noir): Release 0.4.1 (#1164) chore(ssa refactor): Add DenseMap and SparseMap types (#1184) feat: bump noir-source-resolver version (#1182) chore(deps): bump h2 from 0.3.16 to 0.3.18 (#1186) fix(nargo): restore `nargo codegen-verifier` functionality (#1185) chore: simplify setup code in `noir_integration` test (#1180) feat: Add Poseidon-BN254 hash functions (#1176)
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
Refactors a common pattern of having:
HashMap<MyStructId, MyStruct>
into aSparseMap<MyStruct>
Vec<MyStruct>
which also returns and is acccessed by unique Ids into aDenseMap<MyStruct>
.Id<T>
. So for example a ValueId is now aId<Value>
or a "Id that can be used to retrieve a Value." Type aliases are provided to keep the familiar ValueId name though.Checklist
cargo fmt
with default settings.Documentation needs
Additional context
This is a PR for the SSA Refactoring only, it shouldn't cause any observable changes and only touches the ssa-refactor folder.