struct InstCombineContext<'tcx, 'a> {
tcx: TyCtxt<'tcx>,
local_decls: &'a LocalDecls<'tcx>,
}
Fields§
§tcx: TyCtxt<'tcx>
§local_decls: &'a LocalDecls<'tcx>
Implementations§
source§impl<'tcx> InstCombineContext<'tcx, '_>
impl<'tcx> InstCombineContext<'tcx, '_>
fn should_combine(&self, source_info: &SourceInfo, rvalue: &Rvalue<'tcx>) -> bool
sourcefn combine_bool_cmp(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
fn combine_bool_cmp(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
Transform boolean comparisons into logical operations.
fn try_eval_bool(&self, a: &Operand<'_>) -> Option<bool>
sourcefn combine_ref_deref(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
fn combine_ref_deref(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
Transform “&(*a)” ==> “a”.
sourcefn combine_len(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
fn combine_len(&self, source_info: &SourceInfo, rvalue: &mut Rvalue<'tcx>)
Transform “Len([_; N])” ==> “N”.
fn combine_primitive_clone(
&self,
terminator: &mut Terminator<'tcx>,
statements: &mut Vec<Statement<'tcx>>
)
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§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes