Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add option to print monomorphized program (#4119)
# Description Debugging optimizations often requires inspecting the monomorphized program. This adds an option to enable this. ## Problem\* #4067 ## Summary\* Example usage: ```bash ❯ (cd test_programs/compile_success_contract/simple_contract && cargo run compile --show-monomorphized) Compiling nargo_cli v0.23.0 (/Users/michaelklein/Coding/rust/noir/tooling/nargo_cli) Finished dev [optimized + debuginfo] target(s) in 1.79s Running `/Users/michaelklein/Coding/rust/noir/target/debug/nargo compile --show-monomorphized` Monomorphized AST for program with hash: 18020856208726922572 fn triple$f0(x$l0: Field) -> Field { (x$l0 * 3) } Monomorphized AST for program with hash: 9305131916264092540 fn skibbidy$f0(x$l0: Field) -> Field { (x$l0 * 5) } Monomorphized AST for program with hash: 17799031513160233728 fn double$f0(x$l0: Field) -> Field { (x$l0 * 2) } Monomorphized AST for program with hash: 16417890415031598568 fn quadruple$f0(x$l0: Field) -> Field { (x$l0 * 4) } ``` ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. (hidden option) - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <jake@aztecprotocol.com>
- Loading branch information