You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mem2reg): Handle aliases in function last store cleanup and additional 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.
0 commit comments