MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / label_to_index

Function label_to_index

crates/rustc_codegen_spirv/src/linker/mem2reg.rs:48–53  ·  view source on GitHub ↗
(blocks: &[Block], id: Word)

Source from the content-addressed store, hash-verified

46}
47
48fn label_to_index(blocks: &[Block], id: Word) -> usize {
49 blocks
50 .iter()
51 .position(|b| b.label_id().unwrap() == id)
52 .unwrap()
53}
54
55fn compute_reachable(blocks: &[Block]) -> Vec<bool> {
56 fn recurse(blocks: &[Block], reachable: &mut [bool], block: usize) {

Callers 3

recurseFunction · 0.85
compute_predsFunction · 0.85
renameMethod · 0.85

Calls 1

iterMethod · 0.80

Tested by

no test coverage detected