Update clippy settings and fix a few clippy warnings.
This commit is contained in:
@@ -9,7 +9,6 @@ use crate::entity::EntityRef;
|
||||
use crate::ir::instructions::InstructionData;
|
||||
use crate::ir::{DataFlowGraph, Function, Inst, Opcode};
|
||||
use crate::timing;
|
||||
use std::vec::Vec;
|
||||
|
||||
/// Test whether the given opcode is unsafe to even consider for DCE.
|
||||
fn trivially_unsafe_for_dce(opcode: Opcode) -> bool {
|
||||
@@ -46,9 +45,7 @@ pub fn do_dce(func: &mut Function, domtree: &mut DominatorTree) {
|
||||
let _tt = timing::dce();
|
||||
debug_assert!(domtree.is_valid());
|
||||
|
||||
let mut live = Vec::with_capacity(func.dfg.num_values());
|
||||
live.resize(func.dfg.num_values(), false);
|
||||
|
||||
let mut live = vec![false; func.dfg.num_values()];
|
||||
for &ebb in domtree.cfg_postorder() {
|
||||
let mut pos = FuncCursor::new(func).at_bottom(ebb);
|
||||
while let Some(inst) = pos.prev_inst() {
|
||||
|
||||
Reference in New Issue
Block a user