Narrow allow(dead_code) declarations (#4116)
* Narrow `allow(dead_code)` declarations Having module wide `allow(dead_code)` may hide some code that's really dead. In this commit I just narrowed the declarations to the specific enum variants that were not used (as it seems reasonable to keep them and their handling in all the matches, for future use). And the compiler found more dead code that I think we can remove safely in the short term. With this, the only files annotated with a module-wide `allow(dead_code)` are isle-generated files. * resurrect some functions as test helpers
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use regalloc2::Allocation;
|
||||
|
||||
use crate::binemit::{CodeOffset, Reloc, StackMap};
|
||||
use crate::ir::constant::ConstantData;
|
||||
use crate::ir::types::*;
|
||||
use crate::ir::{LibCall, MemFlags, TrapCode};
|
||||
use crate::isa::aarch64::inst::*;
|
||||
@@ -88,12 +87,6 @@ pub fn mem_finalize(
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper: get a ConstantData from a u64.
|
||||
pub fn u64_constant(bits: u64) -> ConstantData {
|
||||
let data = bits.to_le_bytes();
|
||||
ConstantData::from(&data[..])
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Instructions and subcomponents: emission
|
||||
|
||||
|
||||
Reference in New Issue
Block a user