sway_ir

Module instruction

Source
Expand description

Instructions for data manipulation, but mostly control flow.

Since Sway abstracts most low level operations behind traits they are translated into function calls which contain ASM blocks.

Unfortunately, using opaque ASM blocks limits the effectiveness of certain optimizations and this should be addressed in the future, perhaps by using compiler intrinsic calls instead of the ASM blocks where possible. See: https://github.com/FuelLabs/sway/issues/855,

Structs§

BranchToWithArgs
Instruction
InstructionInserter
Provide a context for inserting new Instructions to a Block.
InstructionIterator
Iterate over all Instructions in a specific Block.

Enums§

BinaryOpKind
FuelVmInstruction
InsertionPosition
Where to insert new instructions in the block.
InstOp
Predicate
Comparison operations.
Register
Special registers in the Fuel Virtual Machine.
UnaryOpKind