cranelift_codegen_meta::cdsl::instructions

Struct InstructionContent

Source
pub(crate) struct InstructionContent {
Show 19 fields pub name: String, pub camel_name: String, pub doc: String, pub operands_in: Vec<Operand>, pub operands_out: Vec<Operand>, pub format: Rc<InstructionFormat>, pub polymorphic_info: Option<PolymorphicInfo>, pub value_opnums: Vec<usize>, pub imm_opnums: Vec<usize>, pub value_results: Vec<usize>, pub is_terminator: bool, pub is_branch: bool, pub is_call: bool, pub is_return: bool, pub can_load: bool, pub can_store: bool, pub can_trap: bool, pub other_side_effects: bool, pub side_effects_idempotent: bool,
}

Fields§

§name: String

Instruction mnemonic, also becomes opcode name.

§camel_name: String§doc: String

Documentation string.

§operands_in: Vec<Operand>

Input operands. This can be a mix of SSA value operands and other operand kinds.

§operands_out: Vec<Operand>

Output operands. The output operands must be SSA values or variable_args.

§format: Rc<InstructionFormat>

Instruction format.

§polymorphic_info: Option<PolymorphicInfo>

One of the input or output operands is a free type variable. None if the instruction is not polymorphic, set otherwise.

§value_opnums: Vec<usize>

Indices in operands_in of input operands that are values.

§imm_opnums: Vec<usize>

Indices in operands_in of input operands that are immediates or entities.

§value_results: Vec<usize>

Indices in operands_out of output operands that are values.

§is_terminator: bool

True for instructions that terminate the block.

§is_branch: bool

True for all branch or jump instructions.

§is_call: bool

Is this a call instruction?

§is_return: bool

Is this a return instruction?

§can_load: bool

Can this instruction read from memory?

§can_store: bool

Can this instruction write to memory?

§can_trap: bool

Can this instruction cause a trap?

§other_side_effects: bool

Does this instruction have other side effects besides can_* flags?

§side_effects_idempotent: bool

Despite having other side effects, is this instruction okay to GVN?

Implementations§

Trait Implementations§

Source§

impl Debug for InstructionContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InstructionContent

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.