Get the virtual (non-physical) register, if this register is one.
(self)
| 91 | /// Get the virtual (non-physical) register, if this register is |
| 92 | /// one. |
| 93 | pub fn to_virtual_reg(self) -> Option<VirtualReg> { |
| 94 | if self.to_spillslot().is_some() { |
| 95 | None |
| 96 | } else if pinned_vreg_to_preg(self.0.into()).is_none() { |
| 97 | Some(VirtualReg(self.0.into())) |
| 98 | } else { |
| 99 | None |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /// Get the spillslot, if this register is one. |
| 104 | pub fn to_spillslot(self) -> Option<SpillSlot> { |
no test coverage detected