-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove blocks which consist of only a jump to another block (#5889
) # Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* This PR removes blocks which are empty and just perform an unconditional jump to another block. We instead just update any references to this block with the block which it will eventually jump to. I initially tried applying this optimization universally but ran into troubles where ACIR functions would run into early returns due before branches reached a common block again and so the cfg flattening pass would fail. This optimisation then only applies to brillig functions (although it wouldn't really affect ACIR anyway). ## 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](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
1 parent
6a45007
commit f391af2
Showing
1 changed file
with
73 additions
and
2 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