Skip to content

chore(mem2reg): removing seemingly unnecessary code#9616

Closed
asterite wants to merge 4 commits intomasterfrom
ab/mem2reg_dead_code
Closed

chore(mem2reg): removing seemingly unnecessary code#9616
asterite wants to merge 4 commits intomasterfrom
ab/mem2reg_dead_code

Conversation

@asterite
Copy link
Collaborator

Description

Problem

Resolves #9394

Summary

I don't fully intend this to get merged but it's interesting that there seems to be a lot of code that, when removed, has all tests still pass. Maybe there's some code that fails but isn't tested here? If CI passes I'll try to see if syncing this with Aztec-Packages causes no failures. If failures happen maybe we can craft some tests to prove why the code was needed.

Additional Context

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

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

@asterite asterite changed the title chore(mem2reg): removing seemingly unneeded code chore(mem2reg): removing seemingly unnecessary code Aug 22, 2025
asterite added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 22, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 0decd4d Previous: 3c6914c Ratio
test_report_zkpassport_noir_rsa_ 2 s 1 s 2

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

self.set_aliases(references, array, aliases.clone());
aliases
} else {
AliasSet::unknown()
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this whole section for aliases of arrayset instructions scares me haha.
I suppose it's indicative we don't have tests for it at the very least - I'd hesitate to say it's completely unnecessary but it does have me doubting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree. At least some part of this PR must not be right because Aztec-Packages failed: http://ci.aztec-labs.com/bf55284bb1e49ea4
Now I'm checking if it also fails in the currently open PR for the noir sync (it's failing for another reason, but maybe the failure is before this PR).

@asterite
Copy link
Collaborator Author

This breaks Aztec-Packages so I'm closing this. I'll try to see if I can find a small failing test for this.

@asterite asterite closed this Aug 22, 2025
@asterite asterite deleted the ab/mem2reg_dead_code branch August 22, 2025 20:32
@asterite
Copy link
Collaborator Author

Huh, it seems that the latest Noir sync bumps into the same failure this PR bumped into: AztecProtocol/aztec-packages#16548

That likely means that the changes here aren't the failure cause. I'll try it again once the noir sync is fixed because I'm curious to see if this breaks anything.

(in any case if we go with the Container refactor we might be able to see if some code here indeed had no consequences)

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.

mem2reg: untested code

2 participants