pub(super) fn transform_internal<F: AcirField>(
acir: Circuit<F>,
acir_opcode_positions: Vec<usize>,
brillig_side_effects: &BTreeMap<BrilligFunctionId, bool>,
max_transformer_passes_or_default: Option<usize>,
) -> (Circuit<F>, Vec<usize>, bool)Expand description
Applies backend specific optimizations to a [Circuit].
Accepts an injected acir_opcode_positions to allow transformations to be applied directly after optimizations.
Does multiple passes until the output stabilizes.
Pre-Conditions:
- General Optimizer must run before this pass,
when
max_transformer_passes_or_default.unwrap_or(DEFAULT_MAX_TRANSFORMER_PASSES)is greater than 0