Skip to content

chore: remove unreachable functions after inlining simple functions#8987

Merged
TomAFrench merged 5 commits intomasterfrom
tf/remove-inlined-functions
Jun 23, 2025
Merged

chore: remove unreachable functions after inlining simple functions#8987
TomAFrench merged 5 commits intomasterfrom
tf/remove-inlined-functions

Conversation

@TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

In aztec-packages we have a glut of small functions which hang around in the SSA for a long time after being inlined. This PR integrates the remove_unreachable_functions pass into the inline_simple_functions pass so we can remove these asap.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2025

Changes to Brillig bytecode sizes

Generated at commit: e88598eb29e41607382226591a828ed7af68c8ce, compared to commit: 4e8654353b0f10270a32fe9c6cc7dda1c85234f0

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
regression_6674_3_inliner_zero +64 ❌ +15.61%
slices_inliner_zero +18 ❌ +1.10%

Full diff report 👇
Program Brillig opcodes (+/-) %
regression_6674_3_inliner_zero 474 (+64) +15.61%
slices_inliner_zero 1,650 (+18) +1.10%

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2025

Changes to number of Brillig opcodes executed

Generated at commit: e88598eb29e41607382226591a828ed7af68c8ce, compared to commit: 4e8654353b0f10270a32fe9c6cc7dda1c85234f0

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
regression_6674_3_inliner_zero +60 ❌ +5.24%
slices_inliner_zero +18 ❌ +0.66%

Full diff report 👇
Program Brillig opcodes (+/-) %
regression_6674_3_inliner_zero 1,206 (+60) +5.24%
slices_inliner_zero 2,757 (+18) +0.66%

@TomAFrench
Copy link
Member Author

huh?

@TomAFrench
Copy link
Member Author

Ah, looks like this affects the weights applied to different functions as the simple functions which are now removed would have still contributed to the weight of the functions which they called.

@TomAFrench TomAFrench requested a review from a team June 20, 2025 15:21
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 5759862 Previous: 3838c69 Ratio
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 172 s 141 s 1.22

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@TomAFrench TomAFrench requested a review from aakoshh June 20, 2025 16:43
@TomAFrench TomAFrench enabled auto-merge June 20, 2025 17:33
@TomAFrench TomAFrench added this pull request to the merge queue Jun 23, 2025
Merged via the queue into master with commit 309d445 Jun 23, 2025
118 checks passed
@TomAFrench TomAFrench deleted the tf/remove-inlined-functions branch June 23, 2025 12:44
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 24, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: Implement type suffixes
(noir-lang/noir#8970)
fix: add parent traits when adding trait impl where clause
(noir-lang/noir#9000)
fix(fuzz): Use indirection for taking `&mut` over an array element
(noir-lang/noir#8992)
chore: remove unreachable functions after inlining simple functions
(noir-lang/noir#8987)
chore: bump external pinned commits
(noir-lang/noir#8990)
END_COMMIT_OVERRIDE

Co-authored-by: AztecBot <tech@aztecprotocol.com>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 24, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: Implement type suffixes
(noir-lang/noir#8970)
fix: add parent traits when adding trait impl where clause
(noir-lang/noir#9000)
fix(fuzz): Use indirection for taking `&mut` over an array element
(noir-lang/noir#8992)
chore: remove unreachable functions after inlining simple functions
(noir-lang/noir#8987)
chore: bump external pinned commits
(noir-lang/noir#8990)
END_COMMIT_OVERRIDE

Co-authored-by: AztecBot <tech@aztecprotocol.com>
@aakoshh aakoshh mentioned this pull request Jun 25, 2025
5 tasks
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jul 16, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: Implement type suffixes
(noir-lang/noir#8970)
fix: add parent traits when adding trait impl where clause
(noir-lang/noir#9000)
fix(fuzz): Use indirection for taking `&mut` over an array element
(noir-lang/noir#8992)
chore: remove unreachable functions after inlining simple functions
(noir-lang/noir#8987)
chore: bump external pinned commits
(noir-lang/noir#8990)
END_COMMIT_OVERRIDE

Co-authored-by: AztecBot <tech@aztecprotocol.com>
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.

2 participants