Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions acvm/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ mod transformers;
use optimizers::{GeneralOptimizer, RangeOptimizer};
use transformers::{CSatTransformer, FallbackTransformer, R1CSTransformer};

pub use optimizers::{CircuitSimplifier, SimplifyResult};

#[derive(PartialEq, Eq, Debug, Error)]
pub enum CompileError {
#[error("The blackbox function {0} is not supported by the backend and acvm does not have a fallback implementation")]
Expand All @@ -28,7 +26,6 @@ pub fn compile(
acir: Circuit,
np_language: Language,
is_opcode_supported: impl Fn(&Opcode) -> bool,
simplifier: &CircuitSimplifier,
) -> Result<(Circuit, Vec<OpcodeLabel>), CompileError> {
// Instantiate the optimizer.
// Currently the optimizer and reducer are one in the same
Expand All @@ -40,7 +37,7 @@ pub fn compile(

// Fallback transformer pass
let (acir, opcode_label) =
FallbackTransformer::transform(acir, is_opcode_supported, simplifier, opcode_labels)?;
FallbackTransformer::transform(acir, is_opcode_supported, opcode_labels)?;

// General optimizer pass
let mut opcodes: Vec<Opcode> = Vec::new();
Expand Down
3 changes: 0 additions & 3 deletions acvm/src/compiler/optimizers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
mod general;
mod redundant_range;
mod simplify;

pub(crate) use general::GeneralOptimizer;
pub(crate) use redundant_range::RangeOptimizer;
// Public as these need to be passed to `acvm::compiler::compile()`
pub use simplify::{CircuitSimplifier, SimplifyResult};
Loading