Struct rustc_mir::transform::instcombine::InstCombineContext[−][src]

struct InstCombineContext<'tcx, 'a> {
    tcx: TyCtxt<'tcx>,
    local_decls: &'a LocalDecls<'tcx>,
}

Fields

tcx: TyCtxt<'tcx>local_decls: &'a LocalDecls<'tcx>

Implementations

impl<'tcx, 'a> InstCombineContext<'tcx, 'a>[src]

fn should_combine(
    &self,
    source_info: &SourceInfo,
    rvalue: &Rvalue<'tcx>
) -> bool
[src]

fn combine_bool_cmp(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)[src]

Transform boolean comparisons into logical operations.

fn try_eval_bool(&self, a: &Operand<'_>) -> Option<bool>[src]

fn combine_ref_deref(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)[src]

Transform “&(*a)” ==> “a”.

fn combine_len(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)[src]

Transform “Len([_; N])” ==> “N”.

Auto Trait Implementations

impl<'tcx, 'a> !RefUnwindSafe for InstCombineContext<'tcx, 'a>

impl<'tcx, 'a> !Send for InstCombineContext<'tcx, 'a>

impl<'tcx, 'a> !Sync for InstCombineContext<'tcx, 'a>

impl<'tcx, 'a> Unpin for InstCombineContext<'tcx, 'a> where
    'tcx: 'a, 

impl<'tcx, 'a> !UnwindSafe for InstCombineContext<'tcx, 'a>

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.

impl<T> WithConstness for T[src]