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

fix(ssa refactor): Fix array elements not being mapped to new values #1717

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Jun 15, 2023

Description

Problem*

Resolves #1688 but at what cost? I've spammed .clone()s everywhere due to the function for mapping ValueIds now requiring an &mut self. I'm not satisfied with this approach as a result. I've tried replacing each with the set_value_from_id approach but it caused bugs in loop unrolling presumably from setting the same valueids on each loop iteration.

Summary*

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher
Copy link
Contributor Author

jfecher commented Jun 15, 2023

Also fixes #1698.

Edit: After merging master again it looks like it does not fix #1698. Presumably another pass like function inlining needs the changes here as well.

Copy link
Contributor

@joss-aztec joss-aztec left a comment

Choose a reason for hiding this comment

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

I could only find 6 additional clones - your lamentation had me ready for worse!

@joss-aztec joss-aztec added this pull request to the merge queue Jun 16, 2023
Merged via the queue into master with commit 4ebcbeb Jun 16, 2023
9 checks passed
@joss-aztec joss-aztec deleted the jf/fix-1688 branch June 16, 2023 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array elements orphaned in loop unrolling
2 participants