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

Function has_store

crates/rustc_codegen_spirv/src/linker/mem2reg.rs:359–369  ·  view source on GitHub ↗
(block: &Block, var_map: &FxHashMap<Word, VarInfo>)

Source from the content-addressed store, hash-verified

357}
358
359fn has_store(block: &Block, var_map: &FxHashMap<Word, VarInfo>) -> bool {
360 block.instructions.iter().any(|inst| {
361 let ptr = match inst.class.opcode {
362 Op::Store => inst.operands[0].id_ref_any().unwrap(),
363 Op::Variable if inst.operands.len() < 2 => return false,
364 Op::Variable => inst.result_id.unwrap(),
365 _ => return false,
366 };
367 var_map.contains_key(&ptr)
368 })
369}
370
371fn insert_phis(
372 blocks: &[Block],

Callers 1

insert_phisFunction · 0.85

Calls 1

iterMethod · 0.80

Tested by

no test coverage detected