pub struct CraneliftInstPattern;Expand description
Helpers for recognizing common Cranelift instruction patterns.
Implementations§
Source§impl CraneliftInstPattern
impl CraneliftInstPattern
Sourcepub fn is_pure_arith(instr: &CraneliftInstr) -> bool
pub fn is_pure_arith(instr: &CraneliftInstr) -> bool
Return true if instr is a pure arithmetic (no side effects, no memory) instruction.
Sourcepub fn is_terminator(instr: &CraneliftInstr) -> bool
pub fn is_terminator(instr: &CraneliftInstr) -> bool
Return true if instr is a terminator (ends a block).
Sourcepub fn has_side_effects(instr: &CraneliftInstr) -> bool
pub fn has_side_effects(instr: &CraneliftInstr) -> bool
Return true if instr has side effects (memory or control flow).
Sourcepub fn iconst_value(instr: &CraneliftInstr) -> Option<i64>
pub fn iconst_value(instr: &CraneliftInstr) -> Option<i64>
Try to extract the constant value from an Iconst instruction.
Auto Trait Implementations§
impl Freeze for CraneliftInstPattern
impl RefUnwindSafe for CraneliftInstPattern
impl Send for CraneliftInstPattern
impl Sync for CraneliftInstPattern
impl Unpin for CraneliftInstPattern
impl UnsafeUnpin for CraneliftInstPattern
impl UnwindSafe for CraneliftInstPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more