-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(perf): mem2reg function state for value loads to optimize across…
… blocks (#5757) # Description ## Problem\* Resolves <!-- Link to GitHub Issue --> Part of general effort to reduce Brillig bytecode sizes. No issue as found while working on other brillig optimizations. ## Summary\* Now that we have a brillig gates diff I want to pull out individual changes to live on their own to see only the individual impact across all of our brillig tests. This PR simply sees what is the last load we have performed on an address across all blocks in a function. If we do not have a load on a value, but any of the blocks still have store instructions to that address, we can safely remove those store instructions. ## Additional Context ## 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. --------- Co-authored-by: Tom French <[email protected]> Co-authored-by: jfecher <[email protected]>
- Loading branch information
1 parent
f44e0b3
commit 0b297b3
Showing
1 changed file
with
33 additions
and
14 deletions.
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