Struct cranelift_codegen::isa::registers::RegInfo[][src]

pub struct RegInfo {
    pub banks: &'static [RegBank],
    pub classes: &'static [RegClass],
}
Expand description

Information about the registers in an ISA.

The RegUnit data structure collects all relevant static information about the registers in an ISA.

Fields

banks: &'static [RegBank]

All register banks, ordered by their first_unit. The register banks are disjoint, but there may be holes of unused register unit numbers between banks due to alignment.

classes: &'static [RegClass]

All register classes ordered topologically so a sub-class always follows its parent.

Implementations

impl RegInfo[src]

pub fn bank_containing_regunit(&self, regunit: RegUnit) -> Option<&RegBank>[src]

Get the register bank holding regunit.

pub fn parse_regunit(&self, name: &str) -> Option<RegUnit>[src]

Try to parse a regunit name. The name is not expected to begin with %.

pub fn display_regunit(&self, regunit: RegUnit) -> DisplayRegUnit<'_>[src]

Make a temporary object that can display a register unit.

pub fn rc(&self, idx: RegClassIndex) -> RegClass[src]

Get the register class corresponding to idx.

pub fn toprc(&self, idx: RegClassIndex) -> RegClass[src]

Get the top-level register class containing the idx class.

Trait Implementations

impl Clone for RegInfo[src]

fn clone(&self) -> RegInfo[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl RefUnwindSafe for RegInfo

impl Send for RegInfo

impl Sync for RegInfo

impl Unpin for RegInfo

impl UnwindSafe for RegInfo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.