Conversation
vezenovm
approved these changes
Sep 5, 2023
TomAFrench
added a commit
that referenced
this pull request
Sep 5, 2023
* master: fix(aztec): fix compilation of `aztec_library.rs` (#2567) feat(ssa): Replace values which have previously been constrained with simplified value (#2483) fix: Black box func slice handling (#2562) chore: Temporarily disable `noir_wasm` test (#2566) fix: Make def collector ordering more deterministic (#2515) chore: refactor `constant_folding` pass (#2533) chore: Cleanup mem2reg pass (#2531) chore: Replace hashers of hashmaps in dfg with fxhashes (#2490) chore: remove duplicate span from FunctionReturnType (#2546)
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
Summary*
Cleans up the mem2reg pass a bit by adding a wrapper type for
AliasSets and putting types in different modules.Compared to the old
BTreeMap<ValueId, ReferenceValue>, the newAliasSetmakes it harder to accidentally handle unifying zero values as a set union (A U {} = A) instead of the correctA U {} = {}. In addition, it turns out an original assumption that a value will never be known to have exactly 0 aliases was incorrect. This can happen if we have an empty array of references. The array is empty, so although it has reference-typed elements, we know it does not actually alias anything at all. This means alias sets can no longer use an empty btree to represent the unknown case. It is now represented as anOption<BTreeMap<...>>internally instead.Documentation
This PR requires documentation updates when merged.
Additional Context
I was working on some other PRs including #2494 and an addition to handle SlicePushBack and friends, and found it useful to break out this change into another PR.
I'm also unable to run
cargo tcurrently (see slack) as I'm getting base64 errors, so I've no idea if this PR is passing or not.PR Checklist*
cargo fmton default settings.