Struct cranelift_codegen::machinst::lower::InstColor[][src]

pub struct InstColor(_);

An “instruction color” partitions CLIF instructions by side-effecting ops. All instructions with the same “color” are guaranteed not to be separated by any side-effecting op (for this purpose, loads are also considered side-effecting, to avoid subtle questions w.r.t. the memory model), and furthermore, it is guaranteed that for any two instructions A and B such that color(A) == color(B), either A dominates B and B postdominates A, or vice-versa. (For now, in practice, only ops in the same basic block can ever have the same color, trivially providing the second condition.) Intuitively, this means that the ops of the same color must always execute “together”, as part of one atomic contiguous section of the dynamic execution trace, and they can be freely permuted (modulo true dataflow dependencies) without affecting program behavior.

Implementations

impl InstColor[src]

pub fn get(self) -> u32[src]

Get an arbitrary index representing this color. The index is unique within a single function compilation, but indices may be reused across functions.

Trait Implementations

impl Clone for InstColor[src]

impl Copy for InstColor[src]

impl Debug for InstColor[src]

impl Eq for InstColor[src]

impl Hash for InstColor[src]

impl PartialEq<InstColor> for InstColor[src]

impl StructuralEq for InstColor[src]

impl StructuralPartialEq for InstColor[src]

Auto Trait Implementations

impl RefUnwindSafe for InstColor

impl Send for InstColor

impl Sync for InstColor

impl Unpin for InstColor

impl UnwindSafe for InstColor

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> CallHasher for T where
    T: Hash
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.