summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_data_structures/src/graph/dominators/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /compiler/rustc_data_structures/src/graph/dominators/mod.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/dominators/mod.rs')
-rw-r--r--compiler/rustc_data_structures/src/graph/dominators/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs
index 0a21a4249..0df9dc112 100644
--- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs
@@ -10,7 +10,7 @@
//! <https://www.cs.princeton.edu/courses/archive/spr03/cs423/download/dominators.pdf>
use super::ControlFlowGraph;
-use rustc_index::vec::{Idx, IndexVec};
+use rustc_index::vec::{Idx, IndexSlice, IndexVec};
use std::cmp::Ordering;
#[cfg(test)]
@@ -256,10 +256,10 @@ pub fn dominators<G: ControlFlowGraph>(graph: G) -> Dominators<G::Node> {
/// where `+>` is a proper ancestor and `*>` is just an ancestor.
#[inline]
fn eval(
- ancestor: &mut IndexVec<PreorderIndex, PreorderIndex>,
+ ancestor: &mut IndexSlice<PreorderIndex, PreorderIndex>,
lastlinked: Option<PreorderIndex>,
- semi: &IndexVec<PreorderIndex, PreorderIndex>,
- label: &mut IndexVec<PreorderIndex, PreorderIndex>,
+ semi: &IndexSlice<PreorderIndex, PreorderIndex>,
+ label: &mut IndexSlice<PreorderIndex, PreorderIndex>,
node: PreorderIndex,
) -> PreorderIndex {
if is_processed(node, lastlinked) {
@@ -277,10 +277,10 @@ fn is_processed(v: PreorderIndex, lastlinked: Option<PreorderIndex>) -> bool {
#[inline]
fn compress(
- ancestor: &mut IndexVec<PreorderIndex, PreorderIndex>,
+ ancestor: &mut IndexSlice<PreorderIndex, PreorderIndex>,
lastlinked: Option<PreorderIndex>,
- semi: &IndexVec<PreorderIndex, PreorderIndex>,
- label: &mut IndexVec<PreorderIndex, PreorderIndex>,
+ semi: &IndexSlice<PreorderIndex, PreorderIndex>,
+ label: &mut IndexSlice<PreorderIndex, PreorderIndex>,
v: PreorderIndex,
) {
assert!(is_processed(v, lastlinked));