pub trait InstInserterBase<'f>: Sized {
// Required methods
fn data_flow_graph(&self) -> &DataFlowGraph;
fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph;
fn insert_built_inst(self, inst: Inst) -> &'f mut DataFlowGraph;
fn insert_aux_inst(&mut self, inst: Inst);
}Expand description
Base trait for instruction inserters.
This is an alternative base trait for an instruction builder to implement.
An instruction inserter can be adapted into an instruction builder by wrapping it in an
InsertBuilder. This provides some common functionality for instruction builders that insert
new instructions, as opposed to the ReplaceBuilder which overwrites existing instructions.
Required Methods§
Sourcefn data_flow_graph(&self) -> &DataFlowGraph
fn data_flow_graph(&self) -> &DataFlowGraph
Get an immutable reference to the data flow graph.
Sourcefn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
Get a mutable reference to the data flow graph.
Sourcefn insert_built_inst(self, inst: Inst) -> &'f mut DataFlowGraph
fn insert_built_inst(self, inst: Inst) -> &'f mut DataFlowGraph
Insert a new instruction which belongs to the DFG.
Sourcefn insert_aux_inst(&mut self, inst: Inst)
fn insert_aux_inst(&mut self, inst: Inst)
Insert inst into the layout at the current position without consuming
the inserter, so that further instructions may be inserted afterward.
This backs InstBuilderBase::build_aux_inst for the insertion-based
builders.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".