chore(audit): Fix vector items offset and other refactors#10294
chore(audit): Fix vector items offset and other refactors#10294
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'ACVM Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: f54623b | Previous: 6826de8 | Ratio |
|---|---|---|---|
perfectly_parallel_batch_inversion_opcodes |
2794162 ns/iter (± 2138) |
2259734 ns/iter (± 10347) |
1.24 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ 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: a8e3e6a | Previous: 9cc8190 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ 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: dd1561e | Previous: 52b341d | Ratio |
|---|---|---|---|
rollup-tx-base-private |
21.96 s |
18.24 s |
1.20 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ 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: 6dc6b93 | Previous: 6826de8 | Ratio |
|---|---|---|---|
sha512-100-bytes |
0.078 s |
0.051 s |
1.53 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
8c5d86c to
b283f31
Compare
convert_ssa_instruction dispatch more uniform
compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_instructions/brillig_memory.rs
Show resolved
Hide resolved
compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_instructions/brillig_memory.rs
Outdated
Show resolved
Hide resolved
compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_instructions/brillig_memory.rs
Outdated
Show resolved
Hide resolved
compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs
Outdated
Show resolved
Hide resolved
compiler/noirc_evaluator/src/brillig/brillig_ir/codegen_control_flow.rs
Outdated
Show resolved
Hide resolved
compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_call/mod.rs
Outdated
Show resolved
Hide resolved
Changes to number of Brillig opcodes executed
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Changes to Brillig bytecode sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
…with no #[test] attribute
f54623b to
a8e3e6a
Compare
|
I tracked down that +1 opcode in #10294 (comment) to be caused by c89b2ea It can be undone if we rearrange the code like this: Value::Intrinsic(Intrinsic::SlicePopFront) => {
// ...elements, target_len, target_vector = slice_pop_front len, vector
let target_len = get_target_len(self, element_size);
let pop_variables = vecmap(&results[0..element_size], |result| {
self.variables.define_variable(
self.function_context,
self.brillig_context,
*result,
dfg,
)
});
// Doing this (but not target_len), after the pop_variables, saves 1 opcode in one of the tests.
let target_vector = get_target_vector(self, element_size + 1);It's a bit obscure, so I'd rather just keep it as it is. Looking at the opcodes, I think it's down to luck: we allocate stack memory in different order, and in the very end we end up with 3 MOV before the RETURN versus 2 MOVs if we move |
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore(frontend): Elaborator assignment unit tests (noir-lang/noir#10362) fix(elaborator): Keep the status of the outer `unsafe` block if the inner is unnecessary (noir-lang/noir#10361) chore: Start greenlight of interpreter (noir-lang/noir#10354) chore: bump bb (noir-lang/noir#10359) feat: `TypeDefinition::as_type_with_generics` (noir-lang/noir#10315) fix(elaborator): Create new type variable for each generic kind of `FmtStr` (noir-lang/noir#10349) chore: require ≥2 `FunctionId`'s in `create_apply_function` (noir-lang/noir#10329) chore(test): Show that `#[oracle]` can take and return function pointers (noir-lang/noir#10178) fix: check value of `ArraySet` during `array_set_optimization` (noir-lang/noir#10325) chore(frontend): Comptime item generation unit tests (noir-lang/noir#10319) chore: bump external pinned commits (noir-lang/noir#10236) fix: do not simplify call-data values (noir-lang/noir#10032) chore: update directory name (noir-lang/noir#10348) feat: Add `#[must_use]` attribute to promote unused warning to an error (noir-lang/noir#10313) chore: green light for basic_conditional audit (noir-lang/noir#10134) chore: add unit tests to show some features of the analysis (noir-lang/noir#10286) fix(print): Convert `HirType::Function` into `PrintableType::Tuple` (noir-lang/noir#10189) chore(frontend): Quoting/unquoting roundtrip testing (noir-lang/noir#10327) fix: remove leading stars from block doc comments (noir-lang/noir#10316) fix: slice push_back when length is not known (noir-lang/noir#10206) chore: Fix typo in defunctionalize docs (noir-lang/noir#10321) chore(frontend): Elaborator comptime module docs (noir-lang/noir#10318) fix: "No size for slice" when using black_box (noir-lang/noir#10312) chore(audit): Fix vector items offset and other refactors (noir-lang/noir#10294) chore(audit): Refactors and tests for reg-to-reg movements (noir-lang/noir#10293) chore: Document each elaborator trait function (noir-lang/noir#10303) chore(frontend): Elaborator impls documentation and additional tests (noir-lang/noir#10302) feat(ACIR): reuse element_type_sizes blocks with the same structure (noir-lang/noir#10231) feat(SSA): simplify array_get from param (noir-lang/noir#10300) chore(frontend): Elaborator lazy globals and documentation (noir-lang/noir#10260) chore: avoid unrolling loop headers twice in unrolling passes (noir-lang/noir#10284) chore(audit): Refactors in `BrilligGlobals`, `ConstantAllocation` and `VariableLiveness` (noir-lang/noir#10265) chore: Move variable elaboration to its own file (noir-lang/noir#10285) chore(ACIR): use u32::MAX for PLACEHOLDER_BRILLIG_INDEX (noir-lang/noir#10287) feat(github): Add Security Policy (noir-lang/noir#10262) chore(ACIR): handle TODO in `more_than_eq_var` (noir-lang/noir#10274) chore(ACIR): document AcirValue (noir-lang/noir#10276) chore(Brillig): no need to handle ArrayLen intrinsic (noir-lang/noir#10280) chore(frontend): Split out trait impl setup when defining function meta data (noir-lang/noir#10271) feat(LSP): show errors on stdlib files (noir-lang/noir#10283) chore: typos and some refactors, tests, etc in `noirc_evaluator/src/acir` (noir-lang/noir#10255) chore(ACIR): handle TODO in radix_decompose (noir-lang/noir#10272) feat(brillig): Automatic register deallocation (noir-lang/noir#10253) chore: Add some detail to the trait documentation (noir-lang/noir#10273) chore(frontend): Elaborator struct collection docs (noir-lang/noir#10266) chore(ACIR): add a test for OpcodeResolutionError::AcirMainCallAttempted (noir-lang/noir#10254) fix(ssa-interpreter): Add integer modulus to unfit `Field` if the value comes from a subtraction (noir-lang/noir#10241) chore(frontend): Elaborator function module (noir-lang/noir#10252) chore: typos and some refactors, tests, etc in `acvm/src/compiler` (noir-lang/noir#10111) chore(ACIR): turn "todo" into "unreachable" (noir-lang/noir#10251) chore(frontend): Elaborator module doc comments (noir-lang/noir#10249) chore(ACIR): more Circuit, Expression and Opcode parsing (noir-lang/noir#10250) chore: greenlight Elaborator visibility (noir-lang/noir#10248) chore(audit): Brillig VM nits (noir-lang/noir#10237) fix(mem2reg): Update array set value alias set and propagate array get result as alias (noir-lang/noir#10242) chore(frontend): Split up traits tests module into submodules (noir-lang/noir#10229) chore(frontend): HIR printer module for inline macro expansion unit tests (noir-lang/noir#10232) chore(frontend): Modularize the Elaborator (noir-lang/noir#10202) chore: Improve compilation time on `rollup-tx-base-public` (noir-lang/noir#10224) fix(mem2reg): Updating referenced value invalidate addresses with unknown aliases (noir-lang/noir#10175) chore(frontend): Re-organize frontend tests (noir-lang/noir#10221) chore(ACIR): simpler AsSlice implementation (noir-lang/noir#10214) chore: clone indexed call results (noir-lang/noir#10140) chore(acvm): Optimize logic ops (noir-lang/noir#10222) chore: simplify `x > 0` to `x != 0` for unsigned types in ACIR (noir-lang/noir#10220) fix(ACIR): correct brillig parameter slice length for dynamic arrays (noir-lang/noir#10198) chore: redo typo PR by spuradage (noir-lang/noir#10226) feat: attempt to inline successors in `simplify_cfg` (noir-lang/noir#9608) chore: remove incremental mutation tests (noir-lang/noir#10212) chore(ACIR): display/parse memory arrays as b0, b1, etc. (noir-lang/noir#10211) chore(ACIR): no need to return types in `flatten` (noir-lang/noir#10210) chore(ACIR): make it clear that modulo is only for signed integers (noir-lang/noir#10209) chore: document precondition to unrolling SSA pass (noir-lang/noir#10208) chore(ACIR): better display/parse for blackbox calls (noir-lang/noir#10157) chore: assume Intrinsic::ArrayLen never reaches ACIR (noir-lang/noir#10201) chore(ACIR): optimize slice_insert (noir-lang/noir#10164) chore: add minimal reproductions for Cantina issues + typo fixes (noir-lang/noir#10120) chore: address clippy warnings (noir-lang/noir#10207) fix: address off-by-one error when removing casts before constraining to constant (noir-lang/noir#10194) chore(ACIR): prefer displaying `ASSERT return_value = ...` (noir-lang/noir#10195) chore: remove if-condition from `array_set_optimization_pre_check` (noir-lang/noir#10193) chore(ssa_fuzzer): allow brillig fuzz target to work in multi threads (noir-lang/noir#10100) chore: add incremental mutation testing (noir-lang/noir#10196) chore: ensure that `useful_instructions` cannot overflow (noir-lang/noir#10173) END_COMMIT_OVERRIDE Co-authored-by: benesjan <janbenes1234@gmail.com>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore(frontend): Elaborator assignment unit tests (noir-lang/noir#10362) fix(elaborator): Keep the status of the outer `unsafe` block if the inner is unnecessary (noir-lang/noir#10361) chore: Start greenlight of interpreter (noir-lang/noir#10354) chore: bump bb (noir-lang/noir#10359) feat: `TypeDefinition::as_type_with_generics` (noir-lang/noir#10315) fix(elaborator): Create new type variable for each generic kind of `FmtStr` (noir-lang/noir#10349) chore: require ≥2 `FunctionId`'s in `create_apply_function` (noir-lang/noir#10329) chore(test): Show that `#[oracle]` can take and return function pointers (noir-lang/noir#10178) fix: check value of `ArraySet` during `array_set_optimization` (noir-lang/noir#10325) chore(frontend): Comptime item generation unit tests (noir-lang/noir#10319) chore: bump external pinned commits (noir-lang/noir#10236) fix: do not simplify call-data values (noir-lang/noir#10032) chore: update directory name (noir-lang/noir#10348) feat: Add `#[must_use]` attribute to promote unused warning to an error (noir-lang/noir#10313) chore: green light for basic_conditional audit (noir-lang/noir#10134) chore: add unit tests to show some features of the analysis (noir-lang/noir#10286) fix(print): Convert `HirType::Function` into `PrintableType::Tuple` (noir-lang/noir#10189) chore(frontend): Quoting/unquoting roundtrip testing (noir-lang/noir#10327) fix: remove leading stars from block doc comments (noir-lang/noir#10316) fix: slice push_back when length is not known (noir-lang/noir#10206) chore: Fix typo in defunctionalize docs (noir-lang/noir#10321) chore(frontend): Elaborator comptime module docs (noir-lang/noir#10318) fix: "No size for slice" when using black_box (noir-lang/noir#10312) chore(audit): Fix vector items offset and other refactors (noir-lang/noir#10294) chore(audit): Refactors and tests for reg-to-reg movements (noir-lang/noir#10293) chore: Document each elaborator trait function (noir-lang/noir#10303) chore(frontend): Elaborator impls documentation and additional tests (noir-lang/noir#10302) feat(ACIR): reuse element_type_sizes blocks with the same structure (noir-lang/noir#10231) feat(SSA): simplify array_get from param (noir-lang/noir#10300) chore(frontend): Elaborator lazy globals and documentation (noir-lang/noir#10260) chore: avoid unrolling loop headers twice in unrolling passes (noir-lang/noir#10284) chore(audit): Refactors in `BrilligGlobals`, `ConstantAllocation` and `VariableLiveness` (noir-lang/noir#10265) chore: Move variable elaboration to its own file (noir-lang/noir#10285) chore(ACIR): use u32::MAX for PLACEHOLDER_BRILLIG_INDEX (noir-lang/noir#10287) feat(github): Add Security Policy (noir-lang/noir#10262) chore(ACIR): handle TODO in `more_than_eq_var` (noir-lang/noir#10274) chore(ACIR): document AcirValue (noir-lang/noir#10276) chore(Brillig): no need to handle ArrayLen intrinsic (noir-lang/noir#10280) chore(frontend): Split out trait impl setup when defining function meta data (noir-lang/noir#10271) feat(LSP): show errors on stdlib files (noir-lang/noir#10283) chore: typos and some refactors, tests, etc in `noirc_evaluator/src/acir` (noir-lang/noir#10255) chore(ACIR): handle TODO in radix_decompose (noir-lang/noir#10272) feat(brillig): Automatic register deallocation (noir-lang/noir#10253) chore: Add some detail to the trait documentation (noir-lang/noir#10273) chore(frontend): Elaborator struct collection docs (noir-lang/noir#10266) chore(ACIR): add a test for OpcodeResolutionError::AcirMainCallAttempted (noir-lang/noir#10254) fix(ssa-interpreter): Add integer modulus to unfit `Field` if the value comes from a subtraction (noir-lang/noir#10241) chore(frontend): Elaborator function module (noir-lang/noir#10252) chore: typos and some refactors, tests, etc in `acvm/src/compiler` (noir-lang/noir#10111) chore(ACIR): turn "todo" into "unreachable" (noir-lang/noir#10251) chore(frontend): Elaborator module doc comments (noir-lang/noir#10249) chore(ACIR): more Circuit, Expression and Opcode parsing (noir-lang/noir#10250) chore: greenlight Elaborator visibility (noir-lang/noir#10248) chore(audit): Brillig VM nits (noir-lang/noir#10237) fix(mem2reg): Update array set value alias set and propagate array get result as alias (noir-lang/noir#10242) chore(frontend): Split up traits tests module into submodules (noir-lang/noir#10229) chore(frontend): HIR printer module for inline macro expansion unit tests (noir-lang/noir#10232) chore(frontend): Modularize the Elaborator (noir-lang/noir#10202) chore: Improve compilation time on `rollup-tx-base-public` (noir-lang/noir#10224) fix(mem2reg): Updating referenced value invalidate addresses with unknown aliases (noir-lang/noir#10175) chore(frontend): Re-organize frontend tests (noir-lang/noir#10221) chore(ACIR): simpler AsSlice implementation (noir-lang/noir#10214) chore: clone indexed call results (noir-lang/noir#10140) chore(acvm): Optimize logic ops (noir-lang/noir#10222) chore: simplify `x > 0` to `x != 0` for unsigned types in ACIR (noir-lang/noir#10220) fix(ACIR): correct brillig parameter slice length for dynamic arrays (noir-lang/noir#10198) chore: redo typo PR by spuradage (noir-lang/noir#10226) feat: attempt to inline successors in `simplify_cfg` (noir-lang/noir#9608) chore: remove incremental mutation tests (noir-lang/noir#10212) chore(ACIR): display/parse memory arrays as b0, b1, etc. (noir-lang/noir#10211) chore(ACIR): no need to return types in `flatten` (noir-lang/noir#10210) chore(ACIR): make it clear that modulo is only for signed integers (noir-lang/noir#10209) chore: document precondition to unrolling SSA pass (noir-lang/noir#10208) chore(ACIR): better display/parse for blackbox calls (noir-lang/noir#10157) chore: assume Intrinsic::ArrayLen never reaches ACIR (noir-lang/noir#10201) chore(ACIR): optimize slice_insert (noir-lang/noir#10164) chore: add minimal reproductions for Cantina issues + typo fixes (noir-lang/noir#10120) chore: address clippy warnings (noir-lang/noir#10207) fix: address off-by-one error when removing casts before constraining to constant (noir-lang/noir#10194) chore(ACIR): prefer displaying `ASSERT return_value = ...` (noir-lang/noir#10195) chore: remove if-condition from `array_set_optimization_pre_check` (noir-lang/noir#10193) chore(ssa_fuzzer): allow brillig fuzz target to work in multi threads (noir-lang/noir#10100) chore: add incremental mutation testing (noir-lang/noir#10196) chore: ensure that `useful_instructions` cannot overflow (noir-lang/noir#10173) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore(frontend): Elaborator assignment unit tests (noir-lang/noir#10362) fix(elaborator): Keep the status of the outer `unsafe` block if the inner is unnecessary (noir-lang/noir#10361) chore: Start greenlight of interpreter (noir-lang/noir#10354) chore: bump bb (noir-lang/noir#10359) feat: `TypeDefinition::as_type_with_generics` (noir-lang/noir#10315) fix(elaborator): Create new type variable for each generic kind of `FmtStr` (noir-lang/noir#10349) chore: require ≥2 `FunctionId`'s in `create_apply_function` (noir-lang/noir#10329) chore(test): Show that `#[oracle]` can take and return function pointers (noir-lang/noir#10178) fix: check value of `ArraySet` during `array_set_optimization` (noir-lang/noir#10325) chore(frontend): Comptime item generation unit tests (noir-lang/noir#10319) chore: bump external pinned commits (noir-lang/noir#10236) fix: do not simplify call-data values (noir-lang/noir#10032) chore: update directory name (noir-lang/noir#10348) feat: Add `#[must_use]` attribute to promote unused warning to an error (noir-lang/noir#10313) chore: green light for basic_conditional audit (noir-lang/noir#10134) chore: add unit tests to show some features of the analysis (noir-lang/noir#10286) fix(print): Convert `HirType::Function` into `PrintableType::Tuple` (noir-lang/noir#10189) chore(frontend): Quoting/unquoting roundtrip testing (noir-lang/noir#10327) fix: remove leading stars from block doc comments (noir-lang/noir#10316) fix: slice push_back when length is not known (noir-lang/noir#10206) chore: Fix typo in defunctionalize docs (noir-lang/noir#10321) chore(frontend): Elaborator comptime module docs (noir-lang/noir#10318) fix: "No size for slice" when using black_box (noir-lang/noir#10312) chore(audit): Fix vector items offset and other refactors (noir-lang/noir#10294) chore(audit): Refactors and tests for reg-to-reg movements (noir-lang/noir#10293) chore: Document each elaborator trait function (noir-lang/noir#10303) chore(frontend): Elaborator impls documentation and additional tests (noir-lang/noir#10302) feat(ACIR): reuse element_type_sizes blocks with the same structure (noir-lang/noir#10231) feat(SSA): simplify array_get from param (noir-lang/noir#10300) chore(frontend): Elaborator lazy globals and documentation (noir-lang/noir#10260) chore: avoid unrolling loop headers twice in unrolling passes (noir-lang/noir#10284) chore(audit): Refactors in `BrilligGlobals`, `ConstantAllocation` and `VariableLiveness` (noir-lang/noir#10265) chore: Move variable elaboration to its own file (noir-lang/noir#10285) chore(ACIR): use u32::MAX for PLACEHOLDER_BRILLIG_INDEX (noir-lang/noir#10287) feat(github): Add Security Policy (noir-lang/noir#10262) chore(ACIR): handle TODO in `more_than_eq_var` (noir-lang/noir#10274) chore(ACIR): document AcirValue (noir-lang/noir#10276) chore(Brillig): no need to handle ArrayLen intrinsic (noir-lang/noir#10280) chore(frontend): Split out trait impl setup when defining function meta data (noir-lang/noir#10271) feat(LSP): show errors on stdlib files (noir-lang/noir#10283) chore: typos and some refactors, tests, etc in `noirc_evaluator/src/acir` (noir-lang/noir#10255) chore(ACIR): handle TODO in radix_decompose (noir-lang/noir#10272) feat(brillig): Automatic register deallocation (noir-lang/noir#10253) chore: Add some detail to the trait documentation (noir-lang/noir#10273) chore(frontend): Elaborator struct collection docs (noir-lang/noir#10266) chore(ACIR): add a test for OpcodeResolutionError::AcirMainCallAttempted (noir-lang/noir#10254) fix(ssa-interpreter): Add integer modulus to unfit `Field` if the value comes from a subtraction (noir-lang/noir#10241) chore(frontend): Elaborator function module (noir-lang/noir#10252) chore: typos and some refactors, tests, etc in `acvm/src/compiler` (noir-lang/noir#10111) chore(ACIR): turn "todo" into "unreachable" (noir-lang/noir#10251) chore(frontend): Elaborator module doc comments (noir-lang/noir#10249) chore(ACIR): more Circuit, Expression and Opcode parsing (noir-lang/noir#10250) chore: greenlight Elaborator visibility (noir-lang/noir#10248) chore(audit): Brillig VM nits (noir-lang/noir#10237) fix(mem2reg): Update array set value alias set and propagate array get result as alias (noir-lang/noir#10242) chore(frontend): Split up traits tests module into submodules (noir-lang/noir#10229) chore(frontend): HIR printer module for inline macro expansion unit tests (noir-lang/noir#10232) chore(frontend): Modularize the Elaborator (noir-lang/noir#10202) chore: Improve compilation time on `rollup-tx-base-public` (noir-lang/noir#10224) fix(mem2reg): Updating referenced value invalidate addresses with unknown aliases (noir-lang/noir#10175) chore(frontend): Re-organize frontend tests (noir-lang/noir#10221) chore(ACIR): simpler AsSlice implementation (noir-lang/noir#10214) chore: clone indexed call results (noir-lang/noir#10140) chore(acvm): Optimize logic ops (noir-lang/noir#10222) chore: simplify `x > 0` to `x != 0` for unsigned types in ACIR (noir-lang/noir#10220) fix(ACIR): correct brillig parameter slice length for dynamic arrays (noir-lang/noir#10198) chore: redo typo PR by spuradage (noir-lang/noir#10226) feat: attempt to inline successors in `simplify_cfg` (noir-lang/noir#9608) chore: remove incremental mutation tests (noir-lang/noir#10212) chore(ACIR): display/parse memory arrays as b0, b1, etc. (noir-lang/noir#10211) chore(ACIR): no need to return types in `flatten` (noir-lang/noir#10210) chore(ACIR): make it clear that modulo is only for signed integers (noir-lang/noir#10209) chore: document precondition to unrolling SSA pass (noir-lang/noir#10208) chore(ACIR): better display/parse for blackbox calls (noir-lang/noir#10157) chore: assume Intrinsic::ArrayLen never reaches ACIR (noir-lang/noir#10201) chore(ACIR): optimize slice_insert (noir-lang/noir#10164) chore: add minimal reproductions for Cantina issues + typo fixes (noir-lang/noir#10120) chore: address clippy warnings (noir-lang/noir#10207) fix: address off-by-one error when removing casts before constraining to constant (noir-lang/noir#10194) chore(ACIR): prefer displaying `ASSERT return_value = ...` (noir-lang/noir#10195) chore: remove if-condition from `array_set_optimization_pre_check` (noir-lang/noir#10193) chore(ssa_fuzzer): allow brillig fuzz target to work in multi threads (noir-lang/noir#10100) chore: add incremental mutation testing (noir-lang/noir#10196) chore: ensure that `useful_instructions` cannot overflow (noir-lang/noir#10173) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore(frontend): Elaborator assignment unit tests (noir-lang/noir#10362) fix(elaborator): Keep the status of the outer `unsafe` block if the inner is unnecessary (noir-lang/noir#10361) chore: Start greenlight of interpreter (noir-lang/noir#10354) chore: bump bb (noir-lang/noir#10359) feat: `TypeDefinition::as_type_with_generics` (noir-lang/noir#10315) fix(elaborator): Create new type variable for each generic kind of `FmtStr` (noir-lang/noir#10349) chore: require ≥2 `FunctionId`'s in `create_apply_function` (noir-lang/noir#10329) chore(test): Show that `#[oracle]` can take and return function pointers (noir-lang/noir#10178) fix: check value of `ArraySet` during `array_set_optimization` (noir-lang/noir#10325) chore(frontend): Comptime item generation unit tests (noir-lang/noir#10319) chore: bump external pinned commits (noir-lang/noir#10236) fix: do not simplify call-data values (noir-lang/noir#10032) chore: update directory name (noir-lang/noir#10348) feat: Add `#[must_use]` attribute to promote unused warning to an error (noir-lang/noir#10313) chore: green light for basic_conditional audit (noir-lang/noir#10134) chore: add unit tests to show some features of the analysis (noir-lang/noir#10286) fix(print): Convert `HirType::Function` into `PrintableType::Tuple` (noir-lang/noir#10189) chore(frontend): Quoting/unquoting roundtrip testing (noir-lang/noir#10327) fix: remove leading stars from block doc comments (noir-lang/noir#10316) fix: slice push_back when length is not known (noir-lang/noir#10206) chore: Fix typo in defunctionalize docs (noir-lang/noir#10321) chore(frontend): Elaborator comptime module docs (noir-lang/noir#10318) fix: "No size for slice" when using black_box (noir-lang/noir#10312) chore(audit): Fix vector items offset and other refactors (noir-lang/noir#10294) chore(audit): Refactors and tests for reg-to-reg movements (noir-lang/noir#10293) chore: Document each elaborator trait function (noir-lang/noir#10303) chore(frontend): Elaborator impls documentation and additional tests (noir-lang/noir#10302) feat(ACIR): reuse element_type_sizes blocks with the same structure (noir-lang/noir#10231) feat(SSA): simplify array_get from param (noir-lang/noir#10300) chore(frontend): Elaborator lazy globals and documentation (noir-lang/noir#10260) chore: avoid unrolling loop headers twice in unrolling passes (noir-lang/noir#10284) chore(audit): Refactors in `BrilligGlobals`, `ConstantAllocation` and `VariableLiveness` (noir-lang/noir#10265) chore: Move variable elaboration to its own file (noir-lang/noir#10285) chore(ACIR): use u32::MAX for PLACEHOLDER_BRILLIG_INDEX (noir-lang/noir#10287) feat(github): Add Security Policy (noir-lang/noir#10262) chore(ACIR): handle TODO in `more_than_eq_var` (noir-lang/noir#10274) chore(ACIR): document AcirValue (noir-lang/noir#10276) chore(Brillig): no need to handle ArrayLen intrinsic (noir-lang/noir#10280) chore(frontend): Split out trait impl setup when defining function meta data (noir-lang/noir#10271) feat(LSP): show errors on stdlib files (noir-lang/noir#10283) chore: typos and some refactors, tests, etc in `noirc_evaluator/src/acir` (noir-lang/noir#10255) chore(ACIR): handle TODO in radix_decompose (noir-lang/noir#10272) feat(brillig): Automatic register deallocation (noir-lang/noir#10253) chore: Add some detail to the trait documentation (noir-lang/noir#10273) chore(frontend): Elaborator struct collection docs (noir-lang/noir#10266) chore(ACIR): add a test for OpcodeResolutionError::AcirMainCallAttempted (noir-lang/noir#10254) fix(ssa-interpreter): Add integer modulus to unfit `Field` if the value comes from a subtraction (noir-lang/noir#10241) chore(frontend): Elaborator function module (noir-lang/noir#10252) chore: typos and some refactors, tests, etc in `acvm/src/compiler` (noir-lang/noir#10111) chore(ACIR): turn "todo" into "unreachable" (noir-lang/noir#10251) chore(frontend): Elaborator module doc comments (noir-lang/noir#10249) chore(ACIR): more Circuit, Expression and Opcode parsing (noir-lang/noir#10250) chore: greenlight Elaborator visibility (noir-lang/noir#10248) chore(audit): Brillig VM nits (noir-lang/noir#10237) fix(mem2reg): Update array set value alias set and propagate array get result as alias (noir-lang/noir#10242) chore(frontend): Split up traits tests module into submodules (noir-lang/noir#10229) chore(frontend): HIR printer module for inline macro expansion unit tests (noir-lang/noir#10232) chore(frontend): Modularize the Elaborator (noir-lang/noir#10202) chore: Improve compilation time on `rollup-tx-base-public` (noir-lang/noir#10224) fix(mem2reg): Updating referenced value invalidate addresses with unknown aliases (noir-lang/noir#10175) chore(frontend): Re-organize frontend tests (noir-lang/noir#10221) chore(ACIR): simpler AsSlice implementation (noir-lang/noir#10214) chore: clone indexed call results (noir-lang/noir#10140) chore(acvm): Optimize logic ops (noir-lang/noir#10222) chore: simplify `x > 0` to `x != 0` for unsigned types in ACIR (noir-lang/noir#10220) fix(ACIR): correct brillig parameter slice length for dynamic arrays (noir-lang/noir#10198) chore: redo typo PR by spuradage (noir-lang/noir#10226) feat: attempt to inline successors in `simplify_cfg` (noir-lang/noir#9608) chore: remove incremental mutation tests (noir-lang/noir#10212) chore(ACIR): display/parse memory arrays as b0, b1, etc. (noir-lang/noir#10211) chore(ACIR): no need to return types in `flatten` (noir-lang/noir#10210) chore(ACIR): make it clear that modulo is only for signed integers (noir-lang/noir#10209) chore: document precondition to unrolling SSA pass (noir-lang/noir#10208) chore(ACIR): better display/parse for blackbox calls (noir-lang/noir#10157) chore: assume Intrinsic::ArrayLen never reaches ACIR (noir-lang/noir#10201) chore(ACIR): optimize slice_insert (noir-lang/noir#10164) chore: add minimal reproductions for Cantina issues + typo fixes (noir-lang/noir#10120) chore: address clippy warnings (noir-lang/noir#10207) fix: address off-by-one error when removing casts before constraining to constant (noir-lang/noir#10194) chore(ACIR): prefer displaying `ASSERT return_value = ...` (noir-lang/noir#10195) chore: remove if-condition from `array_set_optimization_pre_check` (noir-lang/noir#10193) chore(ssa_fuzzer): allow brillig fuzz target to work in multi threads (noir-lang/noir#10100) chore: add incremental mutation testing (noir-lang/noir#10196) chore: ensure that `useful_instructions` cannot overflow (noir-lang/noir#10173) END_COMMIT_OVERRIDE Co-authored-by: benesjan <janbenes1234@gmail.com>
Description
Problem*
There are quite a few competing naming conventions under
BrilligBlock::convert_ssa_instruction:binary_gen,convert_ssa_binary,array_get,codegen_allocate, etc, and handling instructions inline. It makes it more difficult than it needs to be to recognise what we are looking at.Also noticed one bug with vector items offset.
Summary*
convert_ssa_instructiondispatches to are namedcodegen_<instruction>and extract the inline ones into their own method with docs.offsetsmodule so we don't have to hint as much at the layouts in comments at various places:VectorAddressandArrayAddresswere moved intomemory.rs, using the newoffsetsmoduleVectorAddress::items_start()to use 3 instead of 2. There were no integration tests failing, but eyeballing the code revealed no reason why they should be different. A unit test failed, but that one manually constructed data without capacity in the meta-data; it is updated now.Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.