(&mut self, rewrite_rules: &mut FxHashMap<Word, Word>, blocks: &[Block])
| 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. |
no test coverage detected