nak: Drop BasicBlock::new()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
This commit is contained in:
Faith Ekstrand
2024-05-23 14:22:50 -05:00
committed by Marge Bot
parent f0ec1873df
commit d7f544365d
2 changed files with 4 additions and 9 deletions
+4 -2
View File
@@ -3252,8 +3252,10 @@ impl<'a> ShaderFromNir<'a> {
}
}
let mut bb = BasicBlock::new(self.get_block_label(nb));
bb.instrs.append(&mut b.as_vec());
let bb = BasicBlock {
label: self.get_block_label(nb),
instrs: b.as_vec(),
};
self.cfg.add_node(nb.index, bb);
}
-7
View File
@@ -5906,13 +5906,6 @@ pub struct BasicBlock {
}
impl BasicBlock {
pub fn new(label: Label) -> BasicBlock {
BasicBlock {
label: label,
instrs: Vec::new(),
}
}
pub fn map_instrs(
&mut self,
mut map: impl FnMut(Box<Instr>) -> MappedInstrs,