pub struct InstData {
pub opcode: Opcode,
pub flags: Flags,
pub results: u8,
pub first_result: Option<Value>,
pub args: ValueList,
pub extra: Extra,
}Expand description
One instruction.
There is no result type here. Each result is a value in the function’s value table and the
type is on the value, which means a reader asking what an instruction produces asks the
same question about add as about call, and there is no second copy of the type to
disagree with the first.
Fields§
§opcode: OpcodeWhich instruction this is.
flags: FlagsWhat the optimizer is licensed to assume about it.
results: u8How many values it produces.
first_result: Option<Value>The first of them, with the rest following it in the value table.
args: ValueListIts value operands.
extra: ExtraEverything else it carries.
Implementations§
Source§impl InstData
impl InstData
Sourcepub const fn new(opcode: Opcode) -> Self
pub const fn new(opcode: Opcode) -> Self
An instruction with no operands, no flags, no results and nothing extra.
Sourcepub fn targets(&self) -> BlockCallList
pub fn targets(&self) -> BlockCallList
The run of targets it branches to, which is empty when it does not branch.
A switch keeps its targets in a side table, so this reads Extra::Targets only and
the function is what answers for the rest.