[−][src]Struct rustc_mir::transform::simplify_comparison_integral::OptimizationInfo

pub(in transform::simplify_comparison_integral) struct OptimizationInfo<'tcx> {
    bb_idx: BasicBlock,
    bin_op_stmt_idx: usize,
    can_remove_bin_op_stmt: bool,
    to_switch_on: Place<'tcx>,
    branch_value_scalar: Scalar,
    branch_value_ty: Ty<'tcx>,
    op: BinOp,
    targets: SwitchTargets,
}

Fields

bb_idx: BasicBlock

Basic block to apply the optimization

bin_op_stmt_idx: usize

Statement index of Eq/Ne assignment that can be removed. None if the assignment can not be removed - i.e the statement is used later on

can_remove_bin_op_stmt: bool

Can remove Eq/Ne assignment

to_switch_on: Place<'tcx>

Place that needs to be switched on. This place is of type integral

branch_value_scalar: Scalar

Constant to use in switch target value

branch_value_ty: Ty<'tcx>

Type of the constant value

op: BinOp

Either Eq or Ne

targets: SwitchTargets

Current targets used in the switch

Trait Implementations

impl<'tcx> Debug for OptimizationInfo<'tcx>[src]

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for OptimizationInfo<'tcx>

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

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]