Enum llhd::ir::InstData[][src]

pub enum InstData {
Show 16 variants ConstInt { opcode: Opcode, imm: IntValue, }, ConstTime { opcode: Opcode, imm: TimeValue, }, Array { opcode: Opcode, imms: [usize; 1], args: [Value; 1], }, Aggregate { opcode: Opcode, args: Vec<Value>, }, Nullary { opcode: Opcode, }, Unary { opcode: Opcode, args: [Value; 1], }, Binary { opcode: Opcode, args: [Value; 2], }, Ternary { opcode: Opcode, args: [Value; 3], }, Quaternary { opcode: Opcode, args: [Value; 4], }, Jump { opcode: Opcode, bbs: [Block; 1], }, Phi { opcode: Opcode, args: Vec<Value>, bbs: Vec<Block>, }, Branch { opcode: Opcode, args: [Value; 1], bbs: [Block; 2], }, Wait { opcode: Opcode, bbs: [Block; 1], args: Vec<Value>, }, Call { opcode: Opcode, unit: ExtUnit, ins: u16, args: Vec<Value>, }, InsExt { opcode: Opcode, args: [Value; 2], imms: [usize; 2], }, Reg { opcode: Opcode, args: Vec<Value>, modes: Vec<RegMode>, },
}
Expand description

An instruction format.

Variants

ConstInt

a = const iN imm

Fields of ConstInt

opcode: Opcodeimm: IntValue
ConstTime

a = const time imm

Fields of ConstTime

opcode: Opcodeimm: TimeValue
Array

opcode imm, type x

Fields of Array

opcode: Opcodeimms: [usize; 1]args: [Value; 1]
Aggregate

opcode args

Fields of Aggregate

opcode: Opcodeargs: Vec<Value>
Nullary

opcode

Fields of Nullary

opcode: Opcode
Unary

opcode type x

Fields of Unary

opcode: Opcodeargs: [Value; 1]
Binary

opcode type x, y

Fields of Binary

opcode: Opcodeargs: [Value; 2]
Ternary

opcode type x, y, z

Fields of Ternary

opcode: Opcodeargs: [Value; 3]
Quaternary

opcode type x, y, z, w

Fields of Quaternary

opcode: Opcodeargs: [Value; 4]
Jump

opcode bb

Fields of Jump

opcode: Opcodebbs: [Block; 1]
Phi

opcode type [x, bb],*

Fields of Phi

opcode: Opcodeargs: Vec<Value>bbs: Vec<Block>
Branch

opcode x, bb0, bb1

Fields of Branch

opcode: Opcodeargs: [Value; 1]bbs: [Block; 2]
Wait

opcode bb, args

Fields of Wait

opcode: Opcodebbs: [Block; 1]args: Vec<Value>
Call

a = opcode type unit (inputs) -> (outputs)

Fields of Call

opcode: Opcodeunit: ExtUnitins: u16args: Vec<Value>
InsExt

a = opcode type x, y, imm0, imm1

Fields of InsExt

opcode: Opcodeargs: [Value; 2]imms: [usize; 2]
Reg

a = reg type x (, data mode trigger)*

Fields of Reg

opcode: Opcodeargs: Vec<Value>modes: Vec<RegMode>

Implementations

Get the opcode of the instruction.

Get the arguments of an instruction.

Get the immediates of an instruction.

Get the input arguments of a call instruction.

Get the output arguments of a call instruction.

Get the data arguments of a register instruction.

Get the trigger arguments of a register instruction.

Get the gating arguments of a register instruction.

Get the modes of a register instruction.

Get the register triggers.

Get the BBs of an instruction.

Return the const int constructed by this instruction.

Return the const time constructed by this instruction.

Return the external unit being called or instantiated by this instruction.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

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

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.