mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-05 21:00:40 +01:00
nak: Use references to src/dst more places
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
This commit is contained in:
parent
ffe438c77d
commit
ddcf0029cd
1 changed files with 4 additions and 4 deletions
|
|
@ -26,7 +26,7 @@ impl PhiDstMap {
|
|||
}
|
||||
}
|
||||
|
||||
fn add_phi_dst(&mut self, phi_idx: u32, dst: Dst) {
|
||||
fn add_phi_dst(&mut self, phi_idx: u32, dst: &Dst) {
|
||||
let vec = dst.as_ssa().expect("Not an SSA destination");
|
||||
debug_assert!(vec.comps() == 1);
|
||||
self.ssa_phi.insert(vec[0], phi_idx);
|
||||
|
|
@ -36,7 +36,7 @@ impl PhiDstMap {
|
|||
let mut map = PhiDstMap::new();
|
||||
if let Some(phi) = block.phi_dsts() {
|
||||
for (idx, dst) in phi.dsts.iter() {
|
||||
map.add_phi_dst(*idx, *dst);
|
||||
map.add_phi_dst(*idx, dst);
|
||||
}
|
||||
}
|
||||
map
|
||||
|
|
@ -58,7 +58,7 @@ impl PhiSrcMap {
|
|||
}
|
||||
}
|
||||
|
||||
fn add_phi_src(&mut self, phi_idx: u32, src: Src) {
|
||||
fn add_phi_src(&mut self, phi_idx: u32, src: &Src) {
|
||||
debug_assert!(src.src_mod.is_none());
|
||||
let vec = src.src_ref.as_ssa().expect("Not an SSA source");
|
||||
debug_assert!(vec.comps() == 1);
|
||||
|
|
@ -69,7 +69,7 @@ impl PhiSrcMap {
|
|||
let mut map = PhiSrcMap::new();
|
||||
if let Some(phi) = block.phi_srcs() {
|
||||
for (idx, src) in phi.srcs.iter() {
|
||||
map.add_phi_src(*idx, *src);
|
||||
map.add_phi_src(*idx, src);
|
||||
}
|
||||
}
|
||||
map
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue