nak: Rip out a few dead_code statements
This is a far less radical solution (but I still removed a decent amount of them) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27991>
This commit is contained in:
@@ -134,7 +134,6 @@ pub struct BitView<'a, BS: BitViewable + ?Sized> {
|
||||
range: Range<usize>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl<'a, BS: BitViewable + ?Sized> BitView<'a, BS> {
|
||||
pub fn new(parent: &'a BS) -> Self {
|
||||
let len = parent.bits();
|
||||
@@ -186,7 +185,6 @@ pub struct BitMutView<'a, BS: BitMutViewable + ?Sized> {
|
||||
range: Range<usize>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl<'a, BS: BitMutViewable + ?Sized> BitMutView<'a, BS> {
|
||||
pub fn new(parent: &'a mut BS) -> Self {
|
||||
let len = parent.bits();
|
||||
@@ -218,7 +216,6 @@ impl<'a, BS: BitMutViewable + ?Sized> BitMutView<'a, BS> {
|
||||
new_start..new_end
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_bit(&self, bit: usize) -> bool {
|
||||
self.get_bit_range_u64(bit..(bit + 1)) != 0
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ impl BitSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn reserve(&mut self, bits: usize) {
|
||||
self.reserve_words(bits.div_ceil(32));
|
||||
}
|
||||
@@ -42,7 +41,6 @@ impl BitSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
for w in self.words.iter() {
|
||||
if *w != 0 {
|
||||
@@ -56,7 +54,6 @@ impl BitSet {
|
||||
self.words.get(word).cloned().unwrap_or(0)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn next_set(&self, start: usize) -> Option<usize> {
|
||||
if start >= self.words.len() * 32 {
|
||||
return None;
|
||||
@@ -75,7 +72,6 @@ impl BitSet {
|
||||
None
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn next_unset(&self, start: usize) -> usize {
|
||||
if start >= self.words.len() * 32 {
|
||||
return start;
|
||||
|
||||
@@ -350,12 +350,10 @@ impl<T> PerRegFile<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn values(&self) -> slice::Iter<T> {
|
||||
self.per_file.iter()
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn values_mut(&mut self) -> slice::IterMut<T> {
|
||||
self.per_file.iter_mut()
|
||||
}
|
||||
@@ -420,7 +418,6 @@ impl SSAValue {
|
||||
}
|
||||
|
||||
/// Returns true if this SSA value is equal to SSAValue::NONE
|
||||
#[allow(dead_code)]
|
||||
pub fn is_none(&self) -> bool {
|
||||
self.packed == 0
|
||||
}
|
||||
@@ -791,6 +788,7 @@ pub enum SrcRef {
|
||||
}
|
||||
|
||||
impl SrcRef {
|
||||
#[allow(dead_code)]
|
||||
pub fn is_alu(&self) -> bool {
|
||||
match self {
|
||||
SrcRef::Zero | SrcRef::Imm32(_) | SrcRef::CBuf(_) => true,
|
||||
@@ -809,6 +807,7 @@ impl SrcRef {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_barrier(&self) -> bool {
|
||||
match self {
|
||||
SrcRef::SSA(ssa) => ssa.file() == RegFile::Bar,
|
||||
@@ -1382,7 +1381,6 @@ macro_rules! impl_display_for_op {
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
|
||||
pub enum PredSetOp {
|
||||
And,
|
||||
@@ -1681,7 +1679,6 @@ impl fmt::Display for FloatType {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
|
||||
pub enum FRndMode {
|
||||
NearestEven,
|
||||
@@ -1982,7 +1979,6 @@ impl fmt::Display for MemOrder {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
|
||||
pub enum MemScope {
|
||||
CTA,
|
||||
@@ -2150,7 +2146,6 @@ impl fmt::Display for AtomOp {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, PartialEq)]
|
||||
pub enum InterpFreq {
|
||||
Pass,
|
||||
@@ -2159,7 +2154,6 @@ pub enum InterpFreq {
|
||||
State,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, PartialEq)]
|
||||
pub enum InterpLoc {
|
||||
Default,
|
||||
@@ -3011,7 +3005,6 @@ impl DisplayOp for OpLop3 {
|
||||
}
|
||||
impl_display_for_op!(OpLop3);
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Copy, Eq, PartialEq)]
|
||||
pub enum ShflOp {
|
||||
Idx,
|
||||
|
||||
@@ -455,6 +455,7 @@ impl ShaderProgramHeader {
|
||||
|
||||
// TODO: This seems always set on fragment shaders, figure out what this is for.
|
||||
#[inline]
|
||||
#[allow(dead_code)]
|
||||
pub fn set_unknown_bit611(&mut self, value: bool) {
|
||||
assert!(self.shader_type == ShaderType::Fragment);
|
||||
self.set_bit(611, value);
|
||||
|
||||
Reference in New Issue
Block a user