Expand description
Core SSA value type: instructions. An instruction is a value that is defined by an operation and can be used by other instructions. Each instruction has a mnemonic, which is the operation that it performs, and a size in bytes of the value it defines. Instructions that do not define a value (e.g. terminators) have a size of 0.
Modules§
- segment
- Token-segment rendering of instructions for rich (colored, clickable) display.
Structs§
- Apply
- Assert
- BadInsn
- Control flow reached bytes that do not decode to a valid instruction.
- Binary
- Branch
- Branch
Ind - CBranch
- Call
- CallInd
- Carry
- Extract
- Projects field
indexout of an aggregate value. The instruction’s result type is that field’s type. - Float
ToFloat - Float
ToInt - Gep
- Computes the address of a struct field:
gep(base, offset)≡base + offset, but the result is typedPtrTo<field.type>and prints by field name instead of the raw offset. - Instruction
- A local SSA value, which is a value that is defined by an instruction and can be used by other instructions. Local values are not associated with any particular memory location.
- Instruction
Id - Instruction
Ref - Instruction
Statement - A formattable wrapper around an instruction reference, which formats the instruction as a string with its mnemonic and operands.
- IntTo
Float - Intrinsic
App - A pure intrinsic instruction: an
IntrinsicIdapplied to its operands. - Intrinsic
Id - A stable-by-name handle into the intrinsic registry.
- Intrinsic
Registration - One intrinsic’s registration, submitted via
inventory::submit!(seeregister_intrinsic!) and collected into the global registry. - IsFloat
NaN - Load
- Local
Insn Id - Function-local instruction index. Storage detail: indexes the owning
FunctionBody’s instruction arena. Pass compositeInstructionIds around in pass code, not these. - LzCount
- Map
- A total element-wise map
out[i] = body(src[i], captures…). The result is[U; N]whereNissrc’s length andUis the body’s return type. - PCodeOp
- PCode
OpId - A stable identifier for a user-defined p-code operation.
- PopCount
- Range
- Return
- Return
Value - SBorrow
- SCarry
- Scan
- A total left-scan
out[i] = acc_i+1whereacc_i+1 = body(acc_i, src[i], captures…)andacc_0 = init. The result is[U; N]whereNissrc’s length andUis the body’s return type (also the accumulator’s type). - Sext
- Store
- Switch
- Multi-way dispatch on an integer scrutinee: the resolved form of a jump table.
- Switch
Arm - One arm of a
Switch: the scrutinee value that selects it, the block it transfers to, and that block’s parameter arguments. - Tail
Call - A tail call: an unconditional transfer of control to another function’s
entry (a thunk
jmp realfunc, or a tailjmp/jccthat the disassembler resolved to a sibling function). UnlikeBranch, whose target is aBlockIdwithin the same function, aTailCallcarries aCallee: normally a realFunctionId, or temporarily a pass-local minted placeholder. It is a function-level terminator with no intra-function CFG successor. This is the honest encoding of cross-function control flow — the IR never stores a foreignBlockId. See the context-split design, ruling 2 (“strict IR locality”). - Tuple
- Builds an aggregate value from its ordered fields. The instruction’s result
type is the
Aggregateof the fields’ types. - Unary
- Zext
Enums§
- Binop
- CallTag
- Per-call-site binding-convention tag (argpromote v2,
ARGPROMOTE_REGISTERS_V2.md). - Callee
- A statically named callee.
Realrefers to an installed function;Mintedis a pass-local placeholder that must be resolved before execution. - Float
Binop - IntBinop
- Mnemonic
- The operation performed by an
Instruction. - RootOp
- The IR shape an intrinsic’s idiom is rooted at, used to gate recognition so only relevant recognizers run per instruction.
- Simplified
- The result of an intrinsic’s
simplifyhook. - Unop
Traits§
- Intrinsic
- The definition of one kind of intrinsic — its name, arity, result typing, shared evaluator, and optional recognition / simplification behaviour.
Functions§
- recognizers_
for - Every intrinsic whose recognition idiom roots at
root. Empty if none.