(block: &Block, var_map: &FxHashMap<Word, VarInfo>)
| 357 | } |
| 358 | |
| 359 | fn 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 | |
| 371 | fn insert_phis( |
| 372 | blocks: &[Block], |