From 286d7c3cdb7db75856c21c5b4fb93783f556c0be Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 1 Feb 2023 17:52:50 -0800 Subject: [PATCH] clean up warnings --- register_allocator/Cargo.toml | 8 +++++++- register_allocator/fuzz/Cargo.toml | 5 ----- .../fuzz/fuzz_targets/loc_set_max_conflicts_with.rs | 1 - register_allocator/fuzz/fuzz_targets/loc_set_ops.rs | 2 -- register_allocator/src/function.rs | 2 +- register_allocator/src/loc_set.rs | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/register_allocator/Cargo.toml b/register_allocator/Cargo.toml index ce3cba2..4d2a0c3 100644 --- a/register_allocator/Cargo.toml +++ b/register_allocator/Cargo.toml @@ -26,4 +26,10 @@ once_cell = "1.17.0" fuzzing = ["libfuzzer-sys"] [workspace] -members = [".", "fuzz"] \ No newline at end of file +members = [".", "fuzz"] + +[profile.release] +# for fuzzing +debug = true +debug-assertions = true +overflow-checks = true diff --git a/register_allocator/fuzz/Cargo.toml b/register_allocator/fuzz/Cargo.toml index 5527865..5a4942a 100644 --- a/register_allocator/fuzz/Cargo.toml +++ b/register_allocator/fuzz/Cargo.toml @@ -11,11 +11,6 @@ cargo-fuzz = true libfuzzer-sys = "0.4.5" bigint-presentation-code-register-allocator = { path = "../", features = ["fuzzing"] } -[profile.release] -debug = true -debug-assertions = true -overflow-checks = true - [[bin]] name = "fn_new" path = "fuzz_targets/fn_new.rs" diff --git a/register_allocator/fuzz/fuzz_targets/loc_set_max_conflicts_with.rs b/register_allocator/fuzz/fuzz_targets/loc_set_max_conflicts_with.rs index c2ee30f..02b2e11 100644 --- a/register_allocator/fuzz/fuzz_targets/loc_set_max_conflicts_with.rs +++ b/register_allocator/fuzz/fuzz_targets/loc_set_max_conflicts_with.rs @@ -1,7 +1,6 @@ #![no_main] use bigint_presentation_code_register_allocator::{ interned::{GlobalState, Intern}, - loc::Loc, loc_set::LocSet, }; use libfuzzer_sys::fuzz_target; diff --git a/register_allocator/fuzz/fuzz_targets/loc_set_ops.rs b/register_allocator/fuzz/fuzz_targets/loc_set_ops.rs index c7be296..db03174 100644 --- a/register_allocator/fuzz/fuzz_targets/loc_set_ops.rs +++ b/register_allocator/fuzz/fuzz_targets/loc_set_ops.rs @@ -87,8 +87,6 @@ macro_rules! check_all_op_combos { fuzz_target!(|data: (HashSet, HashSet)| { let (lhs_hash_set, rhs_hash_set) = data; - let lhs = LocSet::from_iter(lhs_hash_set.iter().copied()); - let rhs = LocSet::from_iter(rhs_hash_set.iter().copied()); check_all_op_combos!( &lhs_hash_set, &rhs_hash_set, diff --git a/register_allocator/src/function.rs b/register_allocator/src/function.rs index b823f3c..cff8039 100644 --- a/register_allocator/src/function.rs +++ b/register_allocator/src/function.rs @@ -2,7 +2,7 @@ use crate::{ error::{Error, Result}, index::{BlockIdx, InstIdx, InstRange, SSAValIdx}, interned::{GlobalState, Intern, Interned}, - loc::{BaseTy, Loc, LocFields, LocKind, Ty}, + loc::{BaseTy, Loc, Ty}, loc_set::LocSet, }; use arbitrary::Arbitrary; diff --git a/register_allocator/src/loc_set.rs b/register_allocator/src/loc_set.rs index 4427569..7f987f6 100644 --- a/register_allocator/src/loc_set.rs +++ b/register_allocator/src/loc_set.rs @@ -734,7 +734,7 @@ impl LocSetMaxConflictsWithTrait for Loc { fn reference_compute_result( lhs: &Interned, rhs: &Self, - global_state: &GlobalState, + _global_state: &GlobalState, ) -> u32 { lhs.iter().map(|loc| rhs.conflicts(loc) as u32).sum::() } -- 2.30.2