pub enum NonDivergingIntrinsic<'tcx> {
    Assume(Operand<'tcx>),
    CopyNonOverlapping(CopyNonOverlapping<'tcx>),
}

Variants§

§

Assume(Operand<'tcx>)

Denotes a call to the intrinsic function assume.

The operand must be a boolean. Optimizers may use the value of the boolean to backtrack its computation to infer information about other variables. So if the boolean came from a x < y operation, subsequent operations on x and y could elide various bound checks. If the argument is false, this operation is equivalent to TerminatorKind::Unreachable.

§

CopyNonOverlapping(CopyNonOverlapping<'tcx>)

Denotes a call to the intrinsic function copy_nonoverlapping.

First, all three operands are evaluated. src and dest must each be a reference, pointer, or Box pointing to the same type T. count must evaluate to a usize. Then, src and dest are dereferenced, and count * size_of::<T>() bytes beginning with the first byte of the src place are copied to the contiguous range of bytes beginning with the first byte of dest.

Needs clarification: In what order are operands computed and dereferenced? It should probably match the order for assignment, but that is also undecided.

Needs clarification: Is this typed or not, ie is there a typed load and store involved? I vaguely remember Ralf saying somewhere that he thought it should not be.

Auto Trait Implementations§

§

impl<'tcx> !RefUnwindSafe for NonDivergingIntrinsic<'tcx>

§

impl<'tcx> !Send for NonDivergingIntrinsic<'tcx>

§

impl<'tcx> !Sync for NonDivergingIntrinsic<'tcx>

§

impl<'tcx> Unpin for NonDivergingIntrinsic<'tcx>

§

impl<'tcx> !UnwindSafe for NonDivergingIntrinsic<'tcx>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where H: Hash + ?Sized, B: BuildHasher,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.