Struct cranelift_codegen::ir::ReplaceBuilder[][src]

pub struct ReplaceBuilder<'f> { /* fields omitted */ }
Expand description

Instruction builder that replaces an existing instruction.

The inserted instruction will have the same Inst number as the old one.

If the old instruction still has result values attached, it is assumed that the new instruction produces the same number and types of results. The old result values are preserved. If the replacement instruction format does not support multiple results, the builder panics. It is a bug to leave result values dangling.

Implementations

impl<'f> ReplaceBuilder<'f>[src]

pub fn new(dfg: &'f mut DataFlowGraph, inst: Inst) -> Self[src]

Create a ReplaceBuilder that will overwrite inst.

Trait Implementations

impl<'f> InstBuilderBase<'f> for ReplaceBuilder<'f>[src]

fn data_flow_graph(&self) -> &DataFlowGraph[src]

Get an immutable reference to the data flow graph that will hold the constructed instructions. Read more

fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph[src]

Get a mutable reference to the data flow graph that will hold the constructed instructions. Read more

fn build(
    self,
    data: InstructionData,
    ctrl_typevar: Type
) -> (Inst, &'f mut DataFlowGraph)
[src]

Insert an instruction and return a reference to it, consuming the builder. Read more

Auto Trait Implementations

impl<'f> RefUnwindSafe for ReplaceBuilder<'f>

impl<'f> Send for ReplaceBuilder<'f>

impl<'f> Sync for ReplaceBuilder<'f>

impl<'f> Unpin for ReplaceBuilder<'f>

impl<'f> !UnwindSafe for ReplaceBuilder<'f>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.