Skip to content

Commit

Permalink
Remove single_limb implementation and use generic noop
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Feb 5, 2025
1 parent d197266 commit 3e609eb
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions src/libfuncs/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ pub fn build<'ctx, 'this>(
signature,
..
})
| CircuitConcreteLibfunc::U96SingleLimbLessThanGuaranteeVerify(
SignatureOnlyConcreteLibfunc { signature, .. },
)
| CircuitConcreteLibfunc::U96GuaranteeVerify(SignatureOnlyConcreteLibfunc { signature }) => {
super::build_noop::<1, true>(
context,
Expand All @@ -86,11 +89,6 @@ pub fn build<'ctx, 'this>(
context, registry, entry, location, helper, metadata, info,
)
}
CircuitConcreteLibfunc::U96SingleLimbLessThanGuaranteeVerify(info) => {
build_u96_single_limb_less_than_guarantee_verify(
context, registry, entry, location, helper, metadata, info,
)
}
}
}

Expand Down Expand Up @@ -822,27 +820,6 @@ fn build_u96_limbs_less_than_guarantee_verify<'ctx, 'this>(
Ok(())
}

/// Generate MLIR operations for the `u96_single_limb_less_than_guarantee_verify` libfunc.
/// NOOP
#[allow(clippy::too_many_arguments)]
fn build_u96_single_limb_less_than_guarantee_verify<'ctx, 'this>(
context: &'ctx Context,
registry: &ProgramRegistry<CoreType, CoreLibfunc>,
entry: &'this Block<'ctx>,
location: Location<'ctx>,
helper: &LibfuncHelper<'ctx, 'this>,
metadata: &mut MetadataStorage,
info: &SignatureOnlyConcreteLibfunc,
) -> Result<()> {
let u96_type_id = &info.branch_signatures()[0].vars[0].ty;
let u96_type = registry.build_type(context, helper, metadata, u96_type_id)?;
let u96 = entry.const_int_from_type(context, location, 0, u96_type)?;

entry.append_operation(helper.br(0, &[u96], location));

Ok(())
}

/// Generate MLIR operations for the `get_circuit_output` libfunc.
#[allow(clippy::too_many_arguments)]
fn build_get_output<'ctx, 'this>(
Expand Down

0 comments on commit 3e609eb

Please sign in to comment.