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:
@@ -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(),
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user