diff --git a/src/mir.rs b/src/mir.rs index 83deeb2..94b40db 100644 --- a/src/mir.rs +++ b/src/mir.rs @@ -721,6 +721,7 @@ impl NodeRef { fn exclusive_start(self) -> (Self, Self) { (self, Self::MAX) } + #[allow(dead_code)] fn inclusive_end(self) -> (Self, Self) { (self, Self::MAX) } @@ -1256,27 +1257,27 @@ impl Mir { let (lhs, rhs) = data.as_binary(); writeln!(w, "%{node} = cmp {ty} %{lhs} {ty} %{rhs}") } - Inst::IsEq(ty) => { + Inst::IsEq(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is eq %{lhs}") } - Inst::IsNeq(ty) => { + Inst::IsNeq(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is neq %{lhs}") } - Inst::IsGt(ty) => { + Inst::IsGt(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is gt %{lhs}") } - Inst::IsLt(ty) => { + Inst::IsLt(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is lt %{lhs}") } - Inst::IsGe(ty) => { + Inst::IsGe(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is ge %{lhs}") } - Inst::IsLe(ty) => { + Inst::IsLe(_) => { let lhs = data.as_node(); writeln!(w, "%{node} = is le %{lhs}") } diff --git a/src/triples.rs b/src/triples.rs index 9a80acb..122e3ea 100644 --- a/src/triples.rs +++ b/src/triples.rs @@ -1250,12 +1250,12 @@ impl<'a> Assembler<'a> { allocas.insert(node, stack_offset); registers.insert(param_reg, node); } - Inst::Eq(ty) - | Inst::Neq(ty) - | Inst::Gt(ty) - | Inst::Lt(ty) - | Inst::Ge(ty) - | Inst::Le(ty) => {} + Inst::Eq(_) + | Inst::Neq(_) + | Inst::Gt(_) + | Inst::Lt(_) + | Inst::Ge(_) + | Inst::Le(_) => {} Inst::Add(ty) => { let (src, dst) = data.unwrap().as_lhs_rhs(); let (&src_reg, _) = registers.iter().find(|(_, node)| node == &&src).unwrap();