Skip to content

Commit

Permalink
chore: remove decomposition of circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Feb 9, 2024
1 parent 59416cb commit 4014494
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions acvm-repo/acvm/src/compiler/optimizers/constant_backpropagation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,12 @@ impl ConstantBackpropOptimizer {
/// Returns a `Circuit` where each Witness is only range constrained
/// once to the lowest number `bit size` possible.
pub(crate) fn backpropagate_constants_iteration(

Check warning on line 120 in acvm-repo/acvm/src/compiler/optimizers/constant_backpropagation.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (backpropagate)
self,
mut self,
order_list: Vec<usize>,
) -> (Circuit, Vec<usize>) {
let mut known_witnesses = self.gather_known_witnesses();

let Circuit {
current_witness_index,
opcodes,
private_parameters,
public_parameters,
return_values,
assert_messages,
expression_width,
recursive,
} = self.circuit;
let opcodes = std::mem::take(&mut self.circuit.opcodes);

fn remap_expression(known_witnesses: &WitnessMap, expression: Expression) -> Expression {
GeneralOptimizer::optimize(ExpressionSolver::evaluate(&expression, known_witnesses))
Expand Down Expand Up @@ -243,18 +234,8 @@ impl ConstantBackpropOptimizer {
new_order_list.push(order_list[idx]);
}

(
Circuit {
current_witness_index,
opcodes: new_opcodes,
private_parameters,
public_parameters,
return_values,
assert_messages,
expression_width,
recursive,
},
new_order_list,
)
self.circuit.opcodes = new_opcodes;

(self.circuit, new_order_list)
}
}

0 comments on commit 4014494

Please sign in to comment.