[−][src]Struct cranelift_codegen::ir::ReplaceBuilder
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.
Methods
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]
fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
[src]
fn build(
self,
data: InstructionData,
ctrl_typevar: Type
) -> (Inst, &'f mut DataFlowGraph)
[src]
self,
data: InstructionData,
ctrl_typevar: Type
) -> (Inst, &'f mut DataFlowGraph)
Auto Trait Implementations
impl<'f> Unpin for ReplaceBuilder<'f>
impl<'f> Send for ReplaceBuilder<'f>
impl<'f> Sync for ReplaceBuilder<'f>
impl<'f> !UnwindSafe for ReplaceBuilder<'f>
impl<'f> RefUnwindSafe for ReplaceBuilder<'f>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,