[][src]Struct cranelift_codegen_meta::cdsl::instructions::InstructionPredicateRegistry

pub(crate) struct InstructionPredicateRegistry {
    map: PrimaryMap<InstructionPredicateNumber, InstructionPredicate>,
    inverted_map: HashMap<InstructionPredicate, InstructionPredicateNumber>,
}

A registry of predicates to help deduplicating them, during Encodings construction. When the construction process is over, it needs to be extracted with extract and associated to the TargetIsa.

Fields

map: PrimaryMap<InstructionPredicateNumber, InstructionPredicate>

Maps a predicate number to its actual predicate.

inverted_map: HashMap<InstructionPredicate, InstructionPredicateNumber>

Inverse map: maps a predicate to its predicate number. This is used before inserting a predicate, to check whether it already exists.

Methods

impl InstructionPredicateRegistry[src]

pub fn new() -> Self[src]

pub fn insert(
    &mut self,
    predicate: InstructionPredicate
) -> InstructionPredicateNumber
[src]

pub fn extract(
    self
) -> PrimaryMap<InstructionPredicateNumber, InstructionPredicate>
[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.

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.