Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: avoid inserting inc_rc instructions into ACIR #7036

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Followup to #7017

Summary*

This PR removes the remaining locations where we push inc_rc instructions into ACIR. I've then made the compiler panic if it sees these being inserted again.

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 and/or cargo fmt on default settings.

@TomAFrench TomAFrench requested a review from a team January 13, 2025 14:18
Copy link
Contributor

Execution Memory Report

Program Peak Memory
keccak256 74.67M
workspace 123.98M
regression_4709 316.00M
ram_blowup_regression 512.61M
rollup-base-public 478.82M
rollup-base-private 325.41M
private-kernel-tail 180.42M
private-kernel-reset 245.11M
private-kernel-inner 208.50M

Copy link
Contributor

Compilation Memory Report

Program Peak Memory
keccak256 78.13M
workspace 123.76M
regression_4709 424.09M
ram_blowup_regression 1.58G
rollup-base-public 4.85G
rollup-base-private 1.26G
private-kernel-tail 207.13M
private-kernel-reset 669.21M
private-kernel-inner 294.35M

Copy link
Contributor

Execution Report

Program Execution Time %
sha256_regression 0.051s -2%
regression_4709 0.001s 0%
ram_blowup_regression 0.602s -1%
rollup-root 0.105s 0%
rollup-merge 0.006s 0%
rollup-block-merge 0.105s 0%
rollup-base-public 1.234s 0%
rollup-base-private 0.453s 0%
private-kernel-tail 0.019s 0%
private-kernel-reset 0.312s -1%
private-kernel-inner 0.068s 0%

Copy link
Contributor

Compilation Report

Program Compilation Time %
sha256_regression 1.314s 6%
regression_4709 0.783s 1%
ram_blowup_regression 18.040s -6%
rollup-root 3.404s 1%
rollup-merge 1.892s 2%
rollup-block-merge 3.400s 1%
rollup-base-public 40.240s -3%
rollup-base-private 12.500s -7%
private-kernel-tail 0.979s 1%
private-kernel-reset 6.434s -15%
private-kernel-inner 2.118s 6%

@TomAFrench TomAFrench enabled auto-merge January 13, 2025 14:26
@TomAFrench TomAFrench added this pull request to the merge queue Jan 13, 2025
@jfecher
Copy link
Contributor

jfecher commented Jan 13, 2025

Is there really that much of a difference in checking is_brillig before inserting these instructions versus checking it after and returning InstructionRemoved? Worried that going down this route more will complicate the passes.

I see -15% in private-kernel-reset but am not sure why it is such a large change for just moving a conditional earlier.

@TomAFrench
Copy link
Member Author

This difference should be explained by just not having to print so many warnings to the log file as there was a lot of these instructions being inserted.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2025
@TomAFrench TomAFrench added this pull request to the merge queue Jan 13, 2025
Merged via the queue into master with commit 2d316c2 Jan 13, 2025
88 checks passed
@TomAFrench TomAFrench deleted the tf/avoid-pushing-incrc-to-acir branch January 13, 2025 15:32
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Jan 13, 2025
…oir-lang/noir#7037)

feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036)
fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027)
chore: add more protocol circuits to reports (noir-lang/noir#6977)
feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031)
feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Jan 14, 2025
…ake averages with single runs (noir-lang/noir#7048)

fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046)
fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043)
feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037)
feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036)
fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027)
chore: add more protocol circuits to reports (noir-lang/noir#6977)
feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031)
feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Jan 14, 2025
… with single runs (noir-lang/noir#7048)

fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046)
fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043)
feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037)
feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036)
fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027)
chore: add more protocol circuits to reports (noir-lang/noir#6977)
feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031)
feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants