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

Function all_inst_iter

crates/rustc_codegen_spirv/src/linker/dce.rs:44–54  ·  view source on GitHub ↗

Exactly the same as Function::all_inst_iter, except return type is `impl DoubleEndedIterator` instead of `impl Iterator`

(func: &Function)

Source from the content-addressed store, hash-verified

42// Exactly the same as Function::all_inst_iter, except return type is `impl DoubleEndedIterator`
43// instead of `impl Iterator`
44fn all_inst_iter(func: &Function) -> impl DoubleEndedIterator<Item = &Instruction> {
45 func.def
46 .iter()
47 .chain(func.parameters.iter())
48 .chain(
49 func.blocks
50 .iter()
51 .flat_map(|b| b.label.iter().chain(b.instructions.iter())),
52 )
53 .chain(func.end.iter())
54}
55
56fn spread_roots(module: &Module, rooted: &mut FxIndexSet<Word>) -> bool {
57 let mut any = false;

Callers 1

spread_rootsFunction · 0.85

Calls 1

iterMethod · 0.80

Tested by

no test coverage detected