compiler/rust/cfg: Use slices instead of &Vec

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
This commit is contained in:
Faith Ekstrand
2025-08-19 11:46:45 -04:00
committed by Marge Bot
parent fcd6616624
commit 70e7d72e7e
+4 -4
View File
@@ -33,7 +33,7 @@ impl<N> DerefMut for CFGNode<N> {
}
fn graph_post_dfs<N>(
nodes: &Vec<CFGNode<N>>,
nodes: &[CFGNode<N>],
id: usize,
seen: &mut BitSet,
post_idx: &mut Vec<usize>,
@@ -107,7 +107,7 @@ fn rev_post_order_sort<N>(nodes: &mut Vec<CFGNode<N>>) {
}
fn find_common_dom<N>(
nodes: &Vec<CFGNode<N>>,
nodes: &[CFGNode<N>],
mut a: usize,
mut b: usize,
) -> usize {
@@ -124,7 +124,7 @@ fn find_common_dom<N>(
fn dom_idx_dfs<N>(
nodes: &mut Vec<CFGNode<N>>,
dom_children: &Vec<Vec<usize>>,
dom_children: &[Vec<usize>],
id: usize,
count: &mut usize,
) {
@@ -178,7 +178,7 @@ fn calc_dominance<N>(nodes: &mut Vec<CFGNode<N>>) {
}
fn loop_detect_dfs<N>(
nodes: &Vec<CFGNode<N>>,
nodes: &[CFGNode<N>],
id: usize,
pre: &mut BitSet,
post: &mut BitSet,