Simpler version of `def_value` used for to set up the initial block entry state. This is always called on a clean state and therefore doesn't need to worry about overlaps or clobbering existing values. However it does need to handle the case where a value is in multiple allocations at once, which `def_value` doesn't need to.
(&mut self, value: Value, alloc: Allocation, reginfo: &impl RegInfo)
| 518 | /// However it does need to handle the case where a value is in multiple |
| 519 | /// allocations at once, which `def_value` doesn't need to. |
| 520 | fn initial_value(&mut self, value: Value, alloc: Allocation, reginfo: &impl RegInfo) { |
| 521 | match alloc.kind() { |
| 522 | AllocationKind::PhysReg(reg) => { |
| 523 | for unit in reginfo.reg_units(reg) { |
| 524 | self.last_unit_write.insert_unique(unit, (reg, value)); |
| 525 | } |
| 526 | self.value_regs.entry(value).or_default().insert(reg); |
| 527 | } |
| 528 | AllocationKind::SpillSlot(slot) => { |
| 529 | self.spillslot_values.insert_unique(slot, value); |
| 530 | } |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | /// Calls `def_value` for each member of a group. |
| 535 | fn def_value_group( |
no test coverage detected