pub struct VReg { /* private fields */ }
Expand description
A virtual register. Contains a virtual register number and a class.
A virtual register (“vreg”) corresponds to an SSA value. All dataflow in the input program is specified via flow through a virtual register; even uses of specially-constrained locations, such as fixed physical registers, are done by using vregs, because we need the vreg’s live range in order to track the use of that location.
Implementations§
Source§impl VReg
impl VReg
pub const MAX_BITS: usize = 21usize
pub const MAX: usize = 2_097_151usize
pub const fn new(virt_reg: usize, class: RegClass) -> Self
pub const fn vreg(self) -> usize
pub const fn class(self) -> RegClass
pub const fn invalid() -> Self
pub const fn bits(self) -> usize
Trait Implementations§
Source§impl Ord for VReg
impl Ord for VReg
Source§impl PartialOrd for VReg
impl PartialOrd for VReg
impl Copy for VReg
impl Eq for VReg
impl StructuralPartialEq for VReg
Auto Trait Implementations§
impl Freeze for VReg
impl RefUnwindSafe for VReg
impl Send for VReg
impl Sync for VReg
impl Unpin for VReg
impl UnwindSafe for VReg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more