-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mem2reg): Handle aliases in function last store cleanup and addit…
…ional alias unit test (#5967) # Description ## Problem\* Partially #5925 (comment) and benefits other post mem2reg function cleanup work #5925. Want to add some more aliasing cases. Works towards making the alias testing surrounding mem2reg more robust. ## Summary\* I have added a mem2reg unit test where the code is storing to an alias inside of a loop. This triggered a failure that has been fixed in this PR. I also confirmed that this unit test would have caught the error triggered by #5935 in AztecProtocol/aztec-packages#8378. We have a simple post-mem2reg process that operates over the final mem2reg state to determine if there are any stores that were missed that can be removed. The check currently does not look at whether the store we are removing is an alias. For now I simply block removing this store if it is an alias. ## Additional Context In follow-ups we can work on handling of aliases in this per function state to remove aliases we know we can simplify. ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [X] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
2 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
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
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