(kind: AllocationKind)
| 105 | #[inline] |
| 106 | #[must_use] |
| 107 | pub fn new(kind: AllocationKind) -> Self { |
| 108 | let bits = match kind { |
| 109 | AllocationKind::SpillSlot(spillslot) => spillslot.index() as u32, |
| 110 | AllocationKind::PhysReg(reg) => (1 << 31) | reg.index() as u32, |
| 111 | }; |
| 112 | Self { bits } |
| 113 | } |
| 114 | |
| 115 | /// Creates an allocation into a `PhysReg`. |
| 116 | #[inline] |