nak: Use Default::default() for BitSet constructors

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
This commit is contained in:
Faith Ekstrand
2025-05-15 21:08:59 -04:00
parent ed658a2d3a
commit 20d247d754
3 changed files with 6 additions and 14 deletions
+2 -2
View File
@@ -271,8 +271,8 @@ impl RegAllocator {
Self {
file: file,
num_regs: num_regs,
used: BitSet::new(),
pinned: BitSet::new(),
used: Default::default(),
pinned: Default::default(),
reg_ssa: Vec::new(),
ssa_reg: Default::default(),
}
+2 -7
View File
@@ -227,6 +227,7 @@ pub trait Liveness {
}
}
#[derive(Default)]
pub struct SimpleBlockLiveness {
defs: BitSet,
uses: BitSet,
@@ -237,13 +238,7 @@ pub struct SimpleBlockLiveness {
impl SimpleBlockLiveness {
fn new() -> Self {
Self {
defs: BitSet::new(),
uses: BitSet::new(),
last_use: Default::default(),
live_in: BitSet::new(),
live_out: BitSet::new(),
}
Default::default()
}
fn add_def(&mut self, ssa: SSAValue) {
+2 -5
View File
@@ -48,6 +48,7 @@ impl PhiMap {
}
}
#[derive(Default)]
struct BarPropPass {
ssa_map: FxHashMap<SSAValue, SSAValue>,
phi_is_bar: BitSet,
@@ -56,11 +57,7 @@ struct BarPropPass {
impl BarPropPass {
pub fn new() -> BarPropPass {
BarPropPass {
ssa_map: Default::default(),
phi_is_bar: BitSet::new(),
phi_is_not_bar: BitSet::new(),
}
Default::default()
}
fn add_copy(&mut self, dst: SSAValue, src: SSAValue) {