Struct falcon::il::Instruction[][src]

pub struct Instruction { /* fields omitted */ }

An Instruction represents location, and non-semantical information about an Operation.

An instruction gives location to an Operation.

Methods are provided to create individual instructions, as all uses cases cannot be seen beforehand. However, it is generally poor-form to create an Instruction manually. You should use the methods on Block which correspond to the Operation you wish to create, and the Instruction will be created automatically.

Methods

impl Instruction
[src]

Create a new instruction with the given index and operation.

Warning

You almost never want to call this function. You should use the methods on il::Block which correspond to the operation you wish to append to that block.

Create a new Assign instruction.

Warning

You almost never want to call this function. You should use the assign method on il::Block instead.

Create a new Store instruction.

Warning

You almost never want to call this function. You should use the store method on il::Block instead.

Create a new Load instruction.

Warning

You almost never want to call this function. You should use the load method on il::Block instead.

Create a new Brc instruction.

Warning

You almost never want to call this function. You should use the brc method on il::Block instead.

Create a new Intrinsic instruction.

Warning

You almost never want to call this function. You should use the intrinsic method on il::Block instead.

Create a new Nop instruction.

Warning

You almost never want to call this function. You should use the nop method on il::Block instead.

Returns true if the Operation for this Instruction is Operation::Assign

Returns true if the Operation for this Instruction is Operation::Store

Returns true if the Operation for this Instruction is Operation::Load

Returns true if the Operation for this Instruction is Operation::Brc

Get the Operation for this Instruction

Get a mutable reference to the Operation for this Instruction

Get the index for this Instruction.

An Instruction index is assigned by its parent Block and uniquely identifies the Instruction within the Block. Instruction indices need not be continuous, nor in order.

Get the optional comment for this Instruction

Set the optional comment for this Instruction

Get the optional address for this Instruction

An Instruction will typically have an address if one was given by a translator. It is not uncommon for there to be a mixture of Instructions with and without comments. For example, applying SSA to a Function will cause Phi instructions to be inserted, and these instructions will not have addresses.

Set the optional address for this Instruction

Get the Scalar which will be written by this Instruction.

Get a mutable reference to the Scalar which will be written by this Instruction.

Get a Vec of each Scalar read by this Instruction.

Get a Vec of mutable references for each Scalar read by this Instruction.

Get all the scalars used in this instruction

Trait Implementations

impl Clone for Instruction
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Instruction
[src]

Formats the value using the given formatter. Read more

impl Eq for Instruction
[src]

impl Hash for Instruction
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Instruction
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialEq for Instruction
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Instruction
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Display for Instruction
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Instruction

impl Sync for Instruction