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

Function root

crates/rustc_codegen_spirv/src/linker/dce.rs:85–96  ·  view source on GitHub ↗
(inst: &Instruction, rooted: &mut FxIndexSet<Word>)

Source from the content-addressed store, hash-verified

83}
84
85fn root(inst: &Instruction, rooted: &mut FxIndexSet<Word>) -> bool {
86 let mut any = false;
87 if let Some(id) = inst.result_type {
88 any |= rooted.insert(id);
89 }
90 for op in &inst.operands {
91 if let Some(id) = op.id_ref_any() {
92 any |= rooted.insert(id);
93 }
94 }
95 any
96}
97
98fn is_rooted(inst: &Instruction, rooted: &FxIndexSet<Word>) -> bool {
99 if let Some(result_id) = inst.result_id {

Callers 2

collect_rootsFunction · 0.85
spread_rootsFunction · 0.85

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected