fn transform_internal_once<F: AcirField>(
acir: Circuit<F>,
expression_width: ExpressionWidth,
acir_opcode_positions: Vec<usize>,
brillig_side_effects: &BTreeMap<BrilligFunctionId, bool>,
) -> (Circuit<F>, Vec<usize>)
Expand description
Accepts an injected acir_opcode_positions
to allow transformations to be applied directly after optimizations.
If the width is unbounded, it does nothing.
If it is bounded, it first performs the ‘CSAT transformation’ in one pass, by creating intermediate variables when necessary.
Then it performs eliminate_intermediate_variable()
which (re-)combine intermediate variables used only once.
It concludes with a round of replace_redundant_ranges()
which removes range checks made redundant by the previous pass.