Skip to content

chore: remove unused brillig function calls#11180

Closed
jialinli98 wants to merge 2 commits intomasterfrom
jl/unused_brillig
Closed

chore: remove unused brillig function calls#11180
jialinli98 wants to merge 2 commits intomasterfrom
jl/unused_brillig

Conversation

@jialinli98
Copy link
Contributor

@jialinli98 jialinli98 commented Jan 13, 2026

Description

Problem

closes #11181

Summary

not tested yet

Additional Context

User Documentation

Check one:

  • No user documentation needed.
  • Changes in docs/ included in this PR.
  • [For Experimental Features] Changes in docs/ 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 Jan 13, 2026

Changes to Brillig bytecode sizes

Generated at commit: edd9d2e81a6706ca844133d8449be376d3fd1e4f, compared to commit: e48a0d8d0e96d1b35964908f875faa9e5e631f59

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
loop_invariant_regression_inliner_max -192 ✅ -88.89%
loop_invariant_regression_inliner_zero -192 ✅ -88.89%
loop_invariant_regression_inliner_min -256 ✅ -91.43%
vectors_inliner_zero -1,921 ✅ -92.31%
higher_order_functions_inliner_max -515 ✅ -95.37%
higher_order_functions_inliner_zero -695 ✅ -96.53%
vector_dynamic_index_inliner_max -1,575 ✅ -97.83%
vector_dynamic_index_inliner_zero -1,575 ✅ -97.83%
vector_dynamic_index_inliner_min -2,074 ✅ -98.34%
higher_order_functions_inliner_min -1,566 ✅ -98.43%
vectors_inliner_max -2,082 ✅ -98.72%

Full diff report 👇
Program Brillig opcodes (+/-) %
static_assert_empty_loop_inliner_min 217 (+101) +87.07%
a_7_function_inliner_min 438 (-7) -1.57%
modulus_inliner_max 1,666 (-33) -1.94%
modulus_inliner_zero 1,666 (-33) -1.94%
modulus_inliner_min 1,666 (-47) -2.74%
a_7_function_inliner_zero 419 (-16) -3.68%
conditional_regression_short_circuit_inliner_max 190 (-11) -5.47%
conditional_regression_short_circuit_inliner_zero 190 (-11) -5.47%
struct_inputs_inliner_max 232 (-15) -6.07%
struct_inputs_inliner_min 228 (-15) -6.17%
struct_inputs_inliner_zero 228 (-15) -6.17%
conditional_regression_short_circuit_inliner_min 200 (-19) -8.68%
global_consts_inliner_max 167 (-16) -8.74%
global_consts_inliner_zero 167 (-16) -8.74%
a_7_function_inliner_max 466 (-47) -9.16%
global_consts_inliner_min 177 (-24) -11.94%
brillig_calls_array_inliner_max 86 (-12) -12.24%
brillig_calls_array_inliner_zero 86 (-12) -12.24%
brillig_arrays_inliner_min 81 (-14) -14.74%
regression_6674_3_inliner_min 541 (-98) -15.34%
vector_dynamic_insert_inliner_max 324 (-62) -16.06%
vector_dynamic_insert_inliner_zero 324 (-62) -16.06%
regression_6674_2_inliner_min 210 (-48) -18.60%
brillig_calls_array_inliner_min 86 (-26) -23.21%
vector_dynamic_insert_inliner_min 333 (-101) -23.27%
conditional_2_inliner_min 110 (-35) -24.14%
global_var_regression_entry_points_inliner_max 35 (-12) -25.53%
brillig_calls_inliner_max 39 (-14) -26.42%
brillig_calls_inliner_zero 39 (-14) -26.42%
regression_6674_1_inliner_min 169 (-67) -28.39%
array_dynamic_inliner_max 201 (-96) -32.32%
array_dynamic_inliner_zero 201 (-96) -32.32%
array_dynamic_inliner_min 201 (-106) -34.53%
regression_6674_2_inliner_zero 122 (-67) -35.45%
regression_6674_1_inliner_zero 122 (-67) -35.45%
global_var_regression_simple_inliner_min 34 (-19) -35.85%
no_predicates_brillig_inliner_max 24 (-15) -38.46%
no_predicates_brillig_inliner_min 24 (-15) -38.46%
no_predicates_brillig_inliner_zero 24 (-15) -38.46%
array_to_vector_inliner_min 498 (-332) -40.00%
brillig_calls_inliner_min 39 (-26) -40.00%
global_var_regression_entry_points_inliner_min 35 (-27) -43.55%
global_var_regression_entry_points_inliner_zero 35 (-27) -43.55%
array_to_vector_inliner_zero 349 (-279) -44.43%
u16_support_inliner_max 22 (-18) -45.00%
u16_support_inliner_min 22 (-18) -45.00%
u16_support_inliner_zero 22 (-18) -45.00%
regression_6674_1_inliner_max 122 (-100) -45.05%
array_dynamic_blackbox_input_inliner_max 197 (-166) -45.73%
array_dynamic_blackbox_input_inliner_zero 197 (-166) -45.73%
reference_alias_in_array_inliner_zero 20 (-18) -47.37%
array_dynamic_blackbox_input_inliner_min 197 (-187) -48.70%
regression_10516_inliner_max 20 (-19) -48.72%
regression_10516_inliner_min 20 (-19) -48.72%
regression_10516_inliner_zero 20 (-19) -48.72%
regression_10923_inliner_max 33 (-38) -53.52%
regression_10923_inliner_min 33 (-38) -53.52%
regression_10923_inliner_zero 33 (-38) -53.52%
references_inliner_zero 88 (-120) -57.69%
array_to_vector_inliner_max 151 (-228) -60.16%
regression_8739_inliner_max 20 (-32) -61.54%
references_inliner_min 88 (-152) -63.33%
regression_8739_inliner_min 20 (-39) -66.10%
regression_8739_inliner_zero 20 (-39) -66.10%
import_inliner_max 28 (-59) -67.82%
import_inliner_zero 28 (-59) -67.82%
generics_inliner_max 26 (-64) -71.11%
generics_inliner_zero 26 (-64) -71.11%
import_inliner_min 28 (-71) -71.72%
generics_inliner_min 26 (-74) -74.00%
vectors_inliner_min 677 (-1,950) -74.23%
references_inliner_max 29 (-107) -78.68%
brillig_entry_points_regression_8069_inliner_max 22 (-110) -83.33%
brillig_entry_points_regression_8069_inliner_min 22 (-110) -83.33%
brillig_entry_points_regression_8069_inliner_zero 22 (-110) -83.33%
loop_invariant_regression_inliner_max 24 (-192) -88.89%
loop_invariant_regression_inliner_zero 24 (-192) -88.89%
loop_invariant_regression_inliner_min 24 (-256) -91.43%
vectors_inliner_zero 160 (-1,921) -92.31%
higher_order_functions_inliner_max 25 (-515) -95.37%
higher_order_functions_inliner_zero 25 (-695) -96.53%
vector_dynamic_index_inliner_max 35 (-1,575) -97.83%
vector_dynamic_index_inliner_zero 35 (-1,575) -97.83%
vector_dynamic_index_inliner_min 35 (-2,074) -98.34%
higher_order_functions_inliner_min 25 (-1,566) -98.43%
vectors_inliner_max 27 (-2,082) -98.72%

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

Changes to number of Brillig opcodes executed

Generated at commit: edd9d2e81a6706ca844133d8449be376d3fd1e4f, compared to commit: e48a0d8d0e96d1b35964908f875faa9e5e631f59

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
higher_order_functions_inliner_zero -1,285 ✅ -98.24%
loop_invariant_regression_inliner_min -1,533 ✅ -98.59%
higher_order_functions_inliner_min -2,114 ✅ -98.92%
vector_dynamic_index_inliner_max -2,605 ✅ -98.94%
vector_dynamic_index_inliner_zero -2,605 ✅ -98.94%
vector_dynamic_index_inliner_min -3,506 ✅ -99.21%
vectors_inliner_max -2,928 ✅ -99.22%
brillig_entry_points_regression_8069_inliner_max -3,289 ✅ -99.40%
brillig_entry_points_regression_8069_inliner_min -3,289 ✅ -99.40%
brillig_entry_points_regression_8069_inliner_zero -3,289 ✅ -99.40%

Full diff report 👇
Program Brillig opcodes (+/-) %
static_assert_empty_loop_inliner_min 196 (+81) +70.43%
conditional_regression_short_circuit_inliner_max 925 (-5) -0.54%
conditional_regression_short_circuit_inliner_zero 925 (-5) -0.54%
struct_inputs_inliner_min 524 (-9) -1.69%
struct_inputs_inliner_zero 524 (-9) -1.69%
conditional_regression_short_circuit_inliner_min 939 (-17) -1.78%
struct_inputs_inliner_max 494 (-9) -1.79%
global_consts_inliner_max 1,307 (-56) -4.11%
global_consts_inliner_zero 1,307 (-56) -4.11%
modulus_inliner_max 13,029 (-651) -4.76%
modulus_inliner_zero 13,029 (-651) -4.76%
global_consts_inliner_min 1,321 (-68) -4.90%
modulus_inliner_min 13,029 (-730) -5.31%
brillig_calls_array_inliner_max 90 (-6) -6.25%
brillig_calls_array_inliner_zero 90 (-6) -6.25%
a_7_function_inliner_max 1,784 (-247) -12.16%
a_7_function_inliner_min 1,853 (-263) -12.43%
a_7_function_inliner_zero 1,826 (-276) -13.13%
regression_10923_inliner_max 31 (-5) -13.89%
regression_10923_inliner_min 31 (-5) -13.89%
regression_10923_inliner_zero 31 (-5) -13.89%
brillig_arrays_inliner_min 93 (-16) -14.68%
array_dynamic_inliner_max 340 (-66) -16.26%
array_dynamic_inliner_zero 340 (-66) -16.26%
array_dynamic_inliner_min 340 (-80) -19.05%
brillig_calls_array_inliner_min 90 (-24) -21.05%
global_var_regression_entry_points_inliner_max 29 (-8) -21.62%
vector_dynamic_insert_inliner_max 738 (-216) -22.64%
vector_dynamic_insert_inliner_zero 738 (-216) -22.64%
conditional_2_inliner_min 114 (-35) -23.49%
no_predicates_brillig_inliner_max 22 (-7) -24.14%
no_predicates_brillig_inliner_min 22 (-7) -24.14%
no_predicates_brillig_inliner_zero 22 (-7) -24.14%
brillig_calls_inliner_max 30 (-11) -26.83%
brillig_calls_inliner_zero 30 (-11) -26.83%
vector_dynamic_insert_inliner_min 751 (-317) -29.68%
u16_support_inliner_max 20 (-12) -37.50%
u16_support_inliner_min 20 (-12) -37.50%
u16_support_inliner_zero 20 (-12) -37.50%
global_var_regression_simple_inliner_min 28 (-19) -40.43%
regression_6674_3_inliner_min 862 (-626) -42.07%
array_to_vector_inliner_min 790 (-635) -44.56%
global_var_regression_entry_points_inliner_min 29 (-25) -46.30%
global_var_regression_entry_points_inliner_zero 29 (-25) -46.30%
brillig_calls_inliner_min 30 (-26) -46.43%
regression_10516_inliner_max 18 (-19) -51.35%
regression_10516_inliner_min 18 (-19) -51.35%
regression_10516_inliner_zero 18 (-19) -51.35%
array_to_vector_inliner_zero 587 (-690) -54.03%
reference_alias_in_array_inliner_zero 18 (-24) -57.14%
regression_8739_inliner_max 18 (-29) -61.70%
array_to_vector_inliner_max 144 (-260) -64.36%
references_inliner_zero 112 (-203) -64.44%
regression_8739_inliner_min 18 (-40) -68.97%
regression_8739_inliner_zero 18 (-40) -68.97%
import_inliner_max 24 (-55) -69.62%
import_inliner_zero 24 (-55) -69.62%
regression_6674_2_inliner_min 202 (-484) -70.55%
references_inliner_min 112 (-293) -72.35%
regression_6674_1_inliner_max 186 (-492) -72.57%
regression_6674_1_inliner_zero 186 (-503) -73.00%
regression_6674_2_inliner_zero 186 (-503) -73.00%
vectors_inliner_min 1,093 (-3,108) -73.98%
import_inliner_min 24 (-71) -74.74%
regression_6674_1_inliner_min 157 (-503) -76.21%
generics_inliner_max 22 (-102) -82.26%
generics_inliner_zero 22 (-102) -82.26%
array_dynamic_blackbox_input_inliner_max 1,098 (-5,359) -83.00%
array_dynamic_blackbox_input_inliner_zero 1,098 (-5,359) -83.00%
array_dynamic_blackbox_input_inliner_min 1,098 (-5,388) -83.07%
generics_inliner_min 22 (-116) -84.06%
references_inliner_max 25 (-159) -86.41%
vectors_inliner_zero 252 (-2,908) -92.03%
loop_invariant_regression_inliner_max 22 (-317) -93.51%
loop_invariant_regression_inliner_zero 22 (-317) -93.51%
higher_order_functions_inliner_max 23 (-803) -97.22%
higher_order_functions_inliner_zero 23 (-1,285) -98.24%
loop_invariant_regression_inliner_min 22 (-1,533) -98.59%
higher_order_functions_inliner_min 23 (-2,114) -98.92%
vector_dynamic_index_inliner_max 28 (-2,605) -98.94%
vector_dynamic_index_inliner_zero 28 (-2,605) -98.94%
vector_dynamic_index_inliner_min 28 (-3,506) -99.21%
vectors_inliner_max 23 (-2,928) -99.22%
brillig_entry_points_regression_8069_inliner_max 20 (-3,289) -99.40%
brillig_entry_points_regression_8069_inliner_min 20 (-3,289) -99.40%
brillig_entry_points_regression_8069_inliner_zero 20 (-3,289) -99.40%

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

Changes to circuit sizes

Generated at commit: edd9d2e81a6706ca844133d8449be376d3fd1e4f, compared to commit: e48a0d8d0e96d1b35964908f875faa9e5e631f59

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
brillig_nested_arrays -1 ✅ -16.67% 0 ➖ 0.00%
global_var_regression_entry_points -1 ✅ -16.67% 0 ➖ 0.00%
u16_support -1 ✅ -2.94% 0 ➖ 0.00%
regression_10923 -3 ✅ -42.86% -2 ✅ -3.17%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
brillig_nested_arrays 5 (-1) -16.67% 2,801 (0) 0.00%
global_var_regression_entry_points 5 (-1) -16.67% 57 (0) 0.00%
u16_support 33 (-1) -2.94% 2,830 (0) 0.00%
regression_10923 4 (-3) -42.86% 61 (-2) -3.17%

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: 236ffb6 Previous: e48a0d8 Ratio
test_report_zkpassport_noir-ecdsa_ 2 s 1 s 2
test_report_zkpassport_noir_rsa_ 2 s 1 s 2

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

CC: @TomAFrench

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 'Brillig Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 385d03c Previous: 2c2a7b8 Ratio
semaphore-depth-10 0.037 s 0.027 s 1.37

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

CC: @TomAFrench

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 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: f895f82 Previous: 2c2a7b8 Ratio
sha512-100-bytes 1.92 s 1.596 s 1.20

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

CC: @TomAFrench

@jialinli98 jialinli98 changed the title draft; mark function as pure if no predicates draft: mark function as pure if no predicates Jan 13, 2026
@jialinli98 jialinli98 changed the title draft: mark function as pure if no predicates chore: remove unused brillig function calls Jan 13, 2026
@TomAFrench
Copy link
Member

This is removing too much currently.

Note that there was another attempt at this a while back in #9659. It was reverted in #9710 as it resulted in failures inside of aztec-packages. It should be fixable but you will need to take care and do thorough testings against aztec-packages (and migrate any reproductions back into this repository).

@TomAFrench TomAFrench marked this pull request as draft January 16, 2026 17:08
@jialinli98 jialinli98 closed this Jan 20, 2026
@jialinli98 jialinli98 reopened this Jan 20, 2026
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 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 236ffb6 Previous: e48a0d8 Ratio
sha512-100-bytes 0.088 s 0.053 s 1.66

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

CC: @TomAFrench

@jialinli98 jialinli98 closed this Jan 30, 2026
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.

Remove unused code for unused brillig function calls

2 participants