pub(crate) struct InstructionBuilder {Show 14 fields
name: String,
doc: String,
format: Rc<InstructionFormat>,
operands_in: Option<Vec<Operand>>,
operands_out: Option<Vec<Operand>>,
is_terminator: bool,
is_branch: bool,
is_call: bool,
is_return: bool,
can_load: bool,
can_store: bool,
can_trap: bool,
other_side_effects: bool,
side_effects_idempotent: bool,
}
Fields§
§name: String
§doc: String
§format: Rc<InstructionFormat>
§operands_in: Option<Vec<Operand>>
§operands_out: Option<Vec<Operand>>
§is_terminator: bool
§is_branch: bool
§is_call: bool
§is_return: bool
§can_load: bool
§can_store: bool
§can_trap: bool
§other_side_effects: bool
§side_effects_idempotent: bool
Implementations§
source§impl InstructionBuilder
impl InstructionBuilder
pub fn new<S: Into<String>>( name: S, doc: S, format: &Rc<InstructionFormat> ) -> Self
pub fn operands_in(self, operands: Vec<Operand>) -> Self
pub fn operands_out(self, operands: Vec<Operand>) -> Self
sourcepub fn terminates_block(self) -> Self
pub fn terminates_block(self) -> Self
Mark this instruction as a block terminator.
sourcepub fn branches(self) -> Self
pub fn branches(self) -> Self
Mark this instruction as a branch instruction. This also implies that the instruction is a block terminator.
sourcepub fn returns(self) -> Self
pub fn returns(self) -> Self
Mark this instruction as a return instruction. This also implies that the instruction is a block terminator.
sourcepub fn other_side_effects(self) -> Self
pub fn other_side_effects(self) -> Self
Mark this instruction as one that has side-effects.
sourcepub fn side_effects_idempotent(self) -> Self
pub fn side_effects_idempotent(self) -> Self
Mark this instruction as one whose side-effects may be de-duplicated.
fn build(self) -> Rc<InstructionContent>
Auto Trait Implementations§
impl !RefUnwindSafe for InstructionBuilder
impl !Send for InstructionBuilder
impl !Sync for InstructionBuilder
impl Unpin for InstructionBuilder
impl !UnwindSafe for InstructionBuilder
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