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

Method add_clone_id_rules

crates/rustc_codegen_spirv/src/linker/inline.rs:779–789  ·  view source on GitHub ↗
(&mut self, rewrite_rules: &mut FxHashMap<Word, Word>, blocks: &[Block])

Source from the content-addressed store, hash-verified

777 }
778
779 fn add_clone_id_rules(&mut self, rewrite_rules: &mut FxHashMap<Word, Word>, blocks: &[Block]) {
780 for block in blocks {
781 for inst in block.label.iter().chain(&block.instructions) {
782 if let Some(result_id) = inst.result_id {
783 let new_id = self.id();
784 let old = rewrite_rules.insert(result_id, new_id);
785 assert!(old.is_none());
786 }
787 }
788 }
789 }
790
791 // HACK(eddyb) the second and third return values are additional debuginfo
792 // instructions that need to be inserted just before/after the callsite.

Callers 1

inline_blockMethod · 0.80

Calls 3

iterMethod · 0.80
idMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected