Skip to content

Commit

Permalink
chore(avm): do not generate subtrace row (#7894)
Browse files Browse the repository at this point in the history
It wasn't really being used, and doing this allow for upcoming codegen improvements/simplifications.

...and, well, less pressure on the compiler!

If we need it we can bring it back for the event-based-gen_trace model.
  • Loading branch information
fcarreiro authored Aug 12, 2024
1 parent d867de1 commit 0d95d9e
Show file tree
Hide file tree
Showing 14 changed files with 293 additions and 1,248 deletions.
123 changes: 0 additions & 123 deletions barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,129 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct AluRow {
FF alu_a_hi{};
FF alu_a_hi_shift{};
FF alu_a_lo{};
FF alu_a_lo_shift{};
FF alu_b_hi{};
FF alu_b_hi_shift{};
FF alu_b_lo{};
FF alu_b_lo_shift{};
FF alu_borrow{};
FF alu_cf{};
FF alu_cmp_rng_ctr{};
FF alu_cmp_rng_ctr_shift{};
FF alu_div_u16_r0{};
FF alu_div_u16_r0_shift{};
FF alu_div_u16_r1{};
FF alu_div_u16_r1_shift{};
FF alu_div_u16_r2{};
FF alu_div_u16_r2_shift{};
FF alu_div_u16_r3{};
FF alu_div_u16_r3_shift{};
FF alu_div_u16_r4{};
FF alu_div_u16_r4_shift{};
FF alu_div_u16_r5{};
FF alu_div_u16_r5_shift{};
FF alu_div_u16_r6{};
FF alu_div_u16_r6_shift{};
FF alu_div_u16_r7{};
FF alu_div_u16_r7_shift{};
FF alu_divisor_hi{};
FF alu_divisor_lo{};
FF alu_ff_tag{};
FF alu_ia{};
FF alu_ib{};
FF alu_ic{};
FF alu_in_tag{};
FF alu_op_add{};
FF alu_op_add_shift{};
FF alu_op_cast{};
FF alu_op_cast_prev{};
FF alu_op_cast_prev_shift{};
FF alu_op_cast_shift{};
FF alu_op_div{};
FF alu_op_div_a_lt_b{};
FF alu_op_div_shift{};
FF alu_op_div_std{};
FF alu_op_eq{};
FF alu_op_eq_diff_inv{};
FF alu_op_lt{};
FF alu_op_lte{};
FF alu_op_mul{};
FF alu_op_mul_shift{};
FF alu_op_not{};
FF alu_op_shl{};
FF alu_op_shl_shift{};
FF alu_op_shr{};
FF alu_op_shr_shift{};
FF alu_op_sub{};
FF alu_op_sub_shift{};
FF alu_p_a_borrow{};
FF alu_p_b_borrow{};
FF alu_p_sub_a_hi{};
FF alu_p_sub_a_hi_shift{};
FF alu_p_sub_a_lo{};
FF alu_p_sub_a_lo_shift{};
FF alu_p_sub_b_hi{};
FF alu_p_sub_b_hi_shift{};
FF alu_p_sub_b_lo{};
FF alu_p_sub_b_lo_shift{};
FF alu_partial_prod_hi{};
FF alu_partial_prod_lo{};
FF alu_quotient_hi{};
FF alu_quotient_lo{};
FF alu_remainder{};
FF alu_res_hi{};
FF alu_res_lo{};
FF alu_sel_alu{};
FF alu_sel_alu_shift{};
FF alu_sel_cmp{};
FF alu_sel_cmp_shift{};
FF alu_sel_div_rng_chk{};
FF alu_sel_div_rng_chk_shift{};
FF alu_sel_rng_chk{};
FF alu_sel_rng_chk_lookup_shift{};
FF alu_sel_rng_chk_shift{};
FF alu_sel_shift_which{};
FF alu_shift_lt_bit_len{};
FF alu_t_sub_s_bits{};
FF alu_two_pow_s{};
FF alu_two_pow_t_sub_s{};
FF alu_u128_tag{};
FF alu_u16_r0{};
FF alu_u16_r0_shift{};
FF alu_u16_r1{};
FF alu_u16_r10{};
FF alu_u16_r11{};
FF alu_u16_r12{};
FF alu_u16_r13{};
FF alu_u16_r14{};
FF alu_u16_r1_shift{};
FF alu_u16_r2{};
FF alu_u16_r2_shift{};
FF alu_u16_r3{};
FF alu_u16_r3_shift{};
FF alu_u16_r4{};
FF alu_u16_r4_shift{};
FF alu_u16_r5{};
FF alu_u16_r5_shift{};
FF alu_u16_r6{};
FF alu_u16_r6_shift{};
FF alu_u16_r7{};
FF alu_u16_r8{};
FF alu_u16_r9{};
FF alu_u16_tag{};
FF alu_u32_tag{};
FF alu_u64_tag{};
FF alu_u8_r0{};
FF alu_u8_r0_shift{};
FF alu_u8_r1{};
FF alu_u8_r1_shift{};
FF alu_u8_tag{};
};

template <typename FF_> class aluImpl {
public:
using FF = FF_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct BinaryRow {
FF binary_acc_ia{};
FF binary_acc_ia_shift{};
FF binary_acc_ib{};
FF binary_acc_ib_shift{};
FF binary_acc_ic{};
FF binary_acc_ic_shift{};
FF binary_ia_bytes{};
FF binary_ib_bytes{};
FF binary_ic_bytes{};
FF binary_mem_tag_ctr{};
FF binary_mem_tag_ctr_inv{};
FF binary_mem_tag_ctr_shift{};
FF binary_op_id{};
FF binary_op_id_shift{};
FF binary_sel_bin{};
};

template <typename FF_> class binaryImpl {
public:
using FF = FF_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct ConversionRow {
FF conversion_sel_to_radix_le{};
};

template <typename FF_> class conversionImpl {
public:
using FF = FF_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct Keccakf1600Row {
FF keccakf1600_sel_keccakf1600{};
};

template <typename FF_> class keccakf1600Impl {
public:
using FF = FF_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct KernelRow {
FF kernel_emit_l2_to_l1_msg_write_offset{};
FF kernel_emit_l2_to_l1_msg_write_offset_shift{};
FF kernel_emit_note_hash_write_offset{};
FF kernel_emit_note_hash_write_offset_shift{};
FF kernel_emit_nullifier_write_offset{};
FF kernel_emit_nullifier_write_offset_shift{};
FF kernel_emit_unencrypted_log_write_offset{};
FF kernel_emit_unencrypted_log_write_offset_shift{};
FF kernel_l1_to_l2_msg_exists_write_offset{};
FF kernel_l1_to_l2_msg_exists_write_offset_shift{};
FF kernel_note_hash_exist_write_offset{};
FF kernel_note_hash_exist_write_offset_shift{};
FF kernel_nullifier_exists_write_offset{};
FF kernel_nullifier_exists_write_offset_shift{};
FF kernel_nullifier_non_exists_write_offset{};
FF kernel_nullifier_non_exists_write_offset_shift{};
FF kernel_sload_write_offset{};
FF kernel_sload_write_offset_shift{};
FF kernel_sstore_write_offset{};
FF kernel_sstore_write_offset_shift{};
FF main_ib{};
FF main_sel_last{};
FF main_sel_op_emit_l2_to_l1_msg{};
FF main_sel_op_emit_note_hash{};
FF main_sel_op_emit_nullifier{};
FF main_sel_op_emit_unencrypted_log{};
FF main_sel_op_l1_to_l2_msg_exists{};
FF main_sel_op_note_hash_exists{};
FF main_sel_op_nullifier_exists{};
FF main_sel_op_sload{};
FF main_sel_op_sstore{};
};

template <typename FF_> class kernelImpl {
public:
using FF = FF_;
Expand Down
124 changes: 0 additions & 124 deletions barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,130 +6,6 @@

namespace bb::Avm_vm {

template <typename FF> struct MainRow {
FF kernel_emit_l2_to_l1_msg_write_offset{};
FF kernel_emit_note_hash_write_offset{};
FF kernel_emit_nullifier_write_offset{};
FF kernel_emit_unencrypted_log_write_offset{};
FF kernel_kernel_in_offset{};
FF kernel_kernel_out_offset{};
FF kernel_l1_to_l2_msg_exists_write_offset{};
FF kernel_note_hash_exist_write_offset{};
FF kernel_nullifier_exists_write_offset{};
FF kernel_nullifier_non_exists_write_offset{};
FF kernel_side_effect_counter{};
FF kernel_side_effect_counter_shift{};
FF kernel_sload_write_offset{};
FF kernel_sstore_write_offset{};
FF main_abs_da_rem_gas_hi{};
FF main_abs_da_rem_gas_lo{};
FF main_abs_l2_rem_gas_hi{};
FF main_abs_l2_rem_gas_lo{};
FF main_alu_in_tag{};
FF main_bin_op_id{};
FF main_call_ptr{};
FF main_da_gas_op_cost{};
FF main_da_gas_remaining{};
FF main_da_gas_remaining_shift{};
FF main_da_out_of_gas{};
FF main_ia{};
FF main_ib{};
FF main_ic{};
FF main_id{};
FF main_id_zero{};
FF main_internal_return_ptr{};
FF main_internal_return_ptr_shift{};
FF main_inv{};
FF main_l2_gas_op_cost{};
FF main_l2_gas_remaining{};
FF main_l2_gas_remaining_shift{};
FF main_l2_out_of_gas{};
FF main_mem_addr_a{};
FF main_mem_addr_b{};
FF main_op_err{};
FF main_pc{};
FF main_pc_shift{};
FF main_r_in_tag{};
FF main_rwa{};
FF main_rwb{};
FF main_rwc{};
FF main_rwd{};
FF main_sel_alu{};
FF main_sel_bin{};
FF main_sel_first{};
FF main_sel_gas_accounting_active{};
FF main_sel_mem_op_a{};
FF main_sel_mem_op_b{};
FF main_sel_mem_op_c{};
FF main_sel_mem_op_d{};
FF main_sel_mov_ia_to_ic{};
FF main_sel_mov_ib_to_ic{};
FF main_sel_op_add{};
FF main_sel_op_address{};
FF main_sel_op_and{};
FF main_sel_op_block_number{};
FF main_sel_op_calldata_copy{};
FF main_sel_op_cast{};
FF main_sel_op_chain_id{};
FF main_sel_op_cmov{};
FF main_sel_op_coinbase{};
FF main_sel_op_dagasleft{};
FF main_sel_op_div{};
FF main_sel_op_emit_l2_to_l1_msg{};
FF main_sel_op_emit_note_hash{};
FF main_sel_op_emit_nullifier{};
FF main_sel_op_emit_unencrypted_log{};
FF main_sel_op_eq{};
FF main_sel_op_external_call{};
FF main_sel_op_external_return{};
FF main_sel_op_fdiv{};
FF main_sel_op_fee_per_da_gas{};
FF main_sel_op_fee_per_l2_gas{};
FF main_sel_op_function_selector{};
FF main_sel_op_get_contract_instance{};
FF main_sel_op_halt{};
FF main_sel_op_internal_call{};
FF main_sel_op_internal_return{};
FF main_sel_op_jump{};
FF main_sel_op_jumpi{};
FF main_sel_op_keccak{};
FF main_sel_op_l1_to_l2_msg_exists{};
FF main_sel_op_l2gasleft{};
FF main_sel_op_lt{};
FF main_sel_op_lte{};
FF main_sel_op_mov{};
FF main_sel_op_mul{};
FF main_sel_op_not{};
FF main_sel_op_note_hash_exists{};
FF main_sel_op_nullifier_exists{};
FF main_sel_op_or{};
FF main_sel_op_pedersen{};
FF main_sel_op_poseidon2{};
FF main_sel_op_radix_le{};
FF main_sel_op_sender{};
FF main_sel_op_sha256{};
FF main_sel_op_shl{};
FF main_sel_op_shr{};
FF main_sel_op_sload{};
FF main_sel_op_sstore{};
FF main_sel_op_storage_address{};
FF main_sel_op_sub{};
FF main_sel_op_timestamp{};
FF main_sel_op_transaction_fee{};
FF main_sel_op_version{};
FF main_sel_op_xor{};
FF main_sel_q_kernel_lookup{};
FF main_sel_q_kernel_output_lookup{};
FF main_sel_resolve_ind_addr_a{};
FF main_sel_resolve_ind_addr_b{};
FF main_sel_resolve_ind_addr_c{};
FF main_sel_resolve_ind_addr_d{};
FF main_sel_slice_gadget{};
FF main_space_id{};
FF main_tag_err{};
FF main_w_in_tag{};
};

template <typename FF_> class mainImpl {
public:
using FF = FF_;
Expand Down
Loading

0 comments on commit 0d95d9e

Please sign in to comment.