MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / arbitrary

Method arbitrary

src/lib.rs:441–451  ·  view source on GitHub ↗
(u: &mut arbitrary::Unstructured<'a>)

Source from the content-addressed store, hash-verified

439#[cfg(feature = "arbitrary")]
440impl<'a> arbitrary::Arbitrary<'a> for Options {
441 fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
442 Ok(Self {
443 move_optimization: u.arbitrary()?,
444 dead_spill_elimination: u.arbitrary()?,
445 split_strategy: u.arbitrary()?,
446 spill_weight_adjust: u.int_in_range(0..=1000000)?,
447 direct_remat_cheaper_than_move_cost_scale: u.int_in_range(0..=100)? as f32 / 100.0,
448 direct_remat_cheaper_than_load_cost_scale: u.int_in_range(0..=100)? as f32 / 100.0,
449 indirect_remat_cost_scale: u.int_in_range(0..=100)? as f32 / 100.0,
450 })
451 }
452}
453
454impl Default for Options {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected