Skip to content

Commit

Permalink
Fix merge conflict and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hoffman committed Oct 24, 2023
1 parent db5ec42 commit c1ee0be
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion circom/tests/loops/assign_in_loop_1.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template Inner() {
signal input in;
Expand Down
1 change: 0 additions & 1 deletion circom/tests/loops/fixed_idx_in_fixed_idx.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

// This case initially triggered the "assert!(bucket_to_args.is_empty());" line in body_extractor.rs
// because the entire expression 'in[byte_order[i]]'' is replaced but the 'byte_order[i]' expression
Expand Down
1 change: 0 additions & 1 deletion circom/tests/loops/inner_conditional_11.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template Sigma() {
signal input inp;
Expand Down
1 change: 0 additions & 1 deletion circom/tests/subcmps/mapped.circom
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pragma circom 2.0.0;

// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template A(n) {
signal input a[n];
Expand Down
1 change: 0 additions & 1 deletion circom/tests/subcmps/mapped2.circom
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pragma circom 2.0.0;

// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template A(n) {
signal input a[n];
Expand Down
1 change: 0 additions & 1 deletion circom/tests/subcmps/mapped3.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template ArrayOp(q) {
signal input inp[15];
Expand Down
1 change: 0 additions & 1 deletion circom/tests/subcmps/mapped4.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template MatrixOp(q) {
signal input inp[5][3];
Expand Down
1 change: 0 additions & 1 deletion circom/tests/subcmps/subcmps3.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma circom 2.0.0;
// REQUIRES: circom
// RUN: rm -rf %t && mkdir %t && %circom --llvm -o %t %s | sed -n 's/.*Written successfully:.* \(.*\)/\1/p' | xargs cat | FileCheck %s --enable-var-scope
// XFAIL:.* // TEMPORARY: because EXTRACT_LOOP_BODY_TO_NEW_FUNC == false

template Sum(n) {
signal input inp[n];
Expand Down
8 changes: 5 additions & 3 deletions circuit_passes/src/passes/unused_func_removal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ impl CircuitTransformationPass for UnusedFuncRemovalPass<'_> {
Circuit {
wasm_producer: circuit.wasm_producer.clone(),
c_producer: circuit.c_producer.clone(),
llvm_data: circuit
.llvm_data
.clone_with_new_field_tracking(circuit.llvm_data.field_tracking.clone()),
llvm_data: circuit.llvm_data.clone_with_updates(
circuit.llvm_data.field_tracking.clone(),
self.get_updated_bounded_array_loads(&circuit.llvm_data.bounded_array_loads),
self.get_updated_bounded_array_stores(&circuit.llvm_data.bounded_array_stores),
),
templates,
functions,
}
Expand Down

0 comments on commit c1ee0be

Please sign in to comment.