package ssa

Import Path
	github.com/tetratelabs/wazero/internal/engine/wazevo/ssa (on go.dev)

Dependency Relation
	imports 7 packages, and imported by 5 packages

Involved Source Files basic_block.go basic_block_sort.go builder.go cmp.go funcref.go instructions.go pass.go pass_blk_layouts.go pass_cfg.go signature.go Package ssa is used to construct SSA function. By nature this is free of Wasm specific thing and ISA. We use the "block argument" variant of SSA: https://en.wikipedia.org/wiki/Static_single-assignment_form#Block_arguments which is equivalent to the traditional PHI function based one, but more convenient during optimizations. However, in this package's source code comment, we might use PHI whenever it seems necessary in order to be aligned with existing literatures, e.g. SSA level optimization algorithms are often described using PHI nodes. The rationale doc for the choice of "block argument" by MLIR of LLVM is worth a read: https://mlir.llvm.org/docs/Rationale/Rationale/#block-arguments-vs-phi-nodes The algorithm to resolve variable definitions used here is based on the paper "Simple and Efficient Construction of Static Single Assignment Form": https://link.springer.com/content/pdf/10.1007/978-3-642-37051-9_6.pdf. type.go vs.go
Package-Level Type Names (total 20)
/* sort by: | */
AtomicRmwOp represents the atomic read-modify-write operation. String implements the fmt.Stringer. AtomicRmwOp : expvar.Var AtomicRmwOp : fmt.Stringer func (*Instruction).AtomicRmwData() (op AtomicRmwOp, size uint64) func (*Instruction).AsAtomicRmw(op AtomicRmwOp, addr, val Value, size uint64) *Instruction const AtomicRmwOpAdd const AtomicRmwOpAnd const AtomicRmwOpOr const AtomicRmwOpSub const AtomicRmwOpXchg const AtomicRmwOpXor
BasicBlock represents the Basic Block of an SSA function. Each BasicBlock always ends with branching instructions (e.g. Branch, Return, etc.), and at most two branches are allowed. If there's two branches, these two are placed together at the end of the block. In other words, there's no branching instruction in the middle of the block. Note: we use the "block argument" variant of SSA, instead of PHI functions. See the package level doc comments. Note: we use "parameter/param" as a placeholder which represents a variant of PHI, and "argument/arg" as an actual Value passed to that "parameter/param". AddParam adds the parameter to the block whose type specified by `t`. EntryBlock returns true if this block represents the function entry. ID returns the unique ID of this block. LoopHeader returns true if this block is a loop header. LoopNestingForestChildren returns the children of this block in the loop nesting forest. Name returns the unique string ID of this block. e.g. blk0, blk1, ... Param returns (Variable, Value) which corresponds to the i-th parameter of this block. The returned Value is the definition of the param in this block. Params returns the number of parameters to this block. Pred returns the i-th predecessor of this block. Preds returns the number of predecessors of this block. ReturnBlock returns ture if this block represents the function return. Root returns the root instruction of this block. Sealed is true if this block has been sealed. Succ returns the i-th successor of this block. Succs returns the number of successors of this block. Tail returns the tail instruction of this block. Valid is true if this block is still valid even after optimizations. BasicBlock : github.com/polarsignals/frostdb/query/logicalplan.Named func BasicBlock.LoopNestingForestChildren() []BasicBlock func BasicBlock.Pred(i int) BasicBlock func BasicBlock.Succ(i int) BasicBlock func Builder.AllocateBasicBlock() BasicBlock func Builder.BasicBlock(id BasicBlockID) BasicBlock func Builder.BlockIteratorBegin() BasicBlock func Builder.BlockIteratorNext() BasicBlock func Builder.BlockIteratorReversePostOrderBegin() BasicBlock func Builder.BlockIteratorReversePostOrderNext() BasicBlock func Builder.CurrentBlock() BasicBlock func Builder.EntryBlock() BasicBlock func Builder.Idom(blk BasicBlock) BasicBlock func Builder.LoopNestingForestRoots() []BasicBlock func Builder.LowestCommonAncestor(blk1, blk2 BasicBlock) BasicBlock func Builder.ReturnBlock() BasicBlock func Builder.DefineVariable(variable Variable, value Value, block BasicBlock) func Builder.Idom(blk BasicBlock) BasicBlock func Builder.LowestCommonAncestor(blk1, blk2 BasicBlock) BasicBlock func Builder.Seal(blk BasicBlock) func Builder.SetCurrentBlock(b BasicBlock) func (*Instruction).AsBrnz(v Value, args Values, target BasicBlock) *Instruction func (*Instruction).AsBrz(v Value, args Values, target BasicBlock) func (*Instruction).AsJump(vs Values, target BasicBlock) *Instruction func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LinkAdjacentBlocks(prev, next BasicBlock) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.StartBlock(BasicBlock)
BasicBlockID is the unique ID of a basicBlock. String implements fmt.Stringer for debugging. BasicBlockID : expvar.Var BasicBlockID : fmt.Stringer func BasicBlock.ID() BasicBlockID func Builder.BlockIDMax() BasicBlockID func (*Instruction).BranchData() (condVal Value, blockArgs []Value, target BasicBlockID) func Builder.BasicBlock(id BasicBlockID) BasicBlock func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.StartLoweringFunction(maxBlockID BasicBlockID)
Builder is used to builds SSA consisting of Basic Blocks per function. AllocateBasicBlock creates a basic block in SSA function. AllocateInstruction returns a new Instruction. AnnotateValue is for debugging purpose. BasicBlock returns the BasicBlock of the given ID. BlockIDMax returns the maximum value of BasicBlocksID existing in the currently-compiled function. BlockIteratorBegin initializes the state to iterate over all the valid BasicBlock(s) compiled. Combined with BlockIteratorNext, we can use this like: for blk := builder.BlockIteratorBegin(); blk != nil; blk = builder.BlockIteratorNext() { // ... } The returned blocks are ordered in the order of AllocateBasicBlock being called. BlockIteratorNext advances the state for iteration initialized by BlockIteratorBegin. Returns nil if there's no unseen BasicBlock. BlockIteratorReversePostOrderBegin is almost the same as BlockIteratorBegin except it returns the BasicBlock in the reverse post-order. This is available after RunPasses is run. BlockIteratorReversePostOrderNext is almost the same as BlockIteratorPostOrderNext except it returns the BasicBlock in the reverse post-order. This is available after RunPasses is run. CurrentBlock returns the currently handled BasicBlock which is set by the latest call to SetCurrentBlock. DeclareSignature appends the *Signature to be referenced by various instructions (e.g. OpcodeCall). DeclareVariable declares a Variable of the given Type. DefineVariable defines a variable in the `block` with value. The defining instruction will be inserted into the `block`. DefineVariableInCurrentBB is the same as DefineVariable except the definition is inserted into the current BasicBlock. Alias to DefineVariable(x, y, CurrentBlock()). EntryBlock returns the entry BasicBlock of the currently-compiled function. FindValueInLinearPath tries to find the latest definition of the given Variable in the linear path to the current BasicBlock. If it cannot find the definition, or it's not sealed yet, it returns ValueInvalid. Format returns the debugging string of the SSA function. Idom returns the immediate dominator of the given BasicBlock. Init must be called to reuse this builder for the next function. InsertInstruction executes BasicBlock.InsertInstruction for the currently handled basic block. InsertUndefined inserts an undefined instruction at the current position. InsertZeroValue inserts a zero value constant instruction of the given type. InstructionOfValue returns the Instruction that produces the given Value or nil if the Value is not produced by any Instruction. LoopNestingForestRoots returns the roots of the loop nesting forest. LowestCommonAncestor returns the lowest common ancestor in the dominator tree of the given BasicBlock(s). MustFindValue searches the latest definition of the given Variable and returns the result. ResolveSignature returns the Signature which corresponds to SignatureID. ReturnBlock returns the BasicBlock which is used to return from the function. RunPasses runs various passes on the constructed SSA function. Seal declares that we've known all the predecessors to this block and were added via AddPred. After calling this, AddPred will be forbidden. SetCurrentBlock sets the instruction insertion target to the BasicBlock `b`. SetCurrentSourceOffset sets the current source offset. The incoming instruction will be annotated with this offset. Signature returns the Signature of the currently-compiled function. Signatures returns the slice of declared Signatures. ValuesInfo returns the data per Value used to lower the SSA in backend. This is indexed by ValueID. VarLengthPool returns the VarLengthPool of Value. func NewBuilder() Builder func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.SSABuilder() Builder func BasicBlock.AddParam(b Builder, t Type) Value func (*Instruction).Format(b Builder) string func (*Instruction).Insert(b Builder) *Instruction func Value.Format(b Builder) string func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.NewCompiler(ctx context.Context, mach backend.Machine, builder Builder) backend.Compiler func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.NewFrontendCompiler(m *wasm.Module, ssaBuilder Builder, offset *wazevoapi.ModuleContextOffsetData, ensureTermination bool, listenerOn bool, sourceInfo bool) *frontend.Compiler
String implements fmt.Stringer. FloatCmpCond : expvar.Var FloatCmpCond : fmt.Stringer func (*Instruction).FcmpData() (x, y Value, c FloatCmpCond) func (*Instruction).VFcmpData() (x, y Value, c FloatCmpCond, l VecLane) func (*Instruction).AsFcmp(x, y Value, c FloatCmpCond) func (*Instruction).AsVFcmp(x, y Value, c FloatCmpCond, lane VecLane) *Instruction const FloatCmpCondEqual const FloatCmpCondGreaterThan const FloatCmpCondGreaterThanOrEqual const FloatCmpCondInvalid const FloatCmpCondLessThan const FloatCmpCondLessThanOrEqual const FloatCmpCondNotEqual
FuncRef is a unique identifier for a function of the frontend, and is used to reference the function in function call. String implements fmt.Stringer. FuncRef : expvar.Var FuncRef : fmt.Stringer func (*Instruction).CallData() (ref FuncRef, sigID SignatureID, args []Value) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.FunctionIndexToFuncRef(idx wasm.Index) FuncRef func (*Instruction).AsCall(ref FuncRef, sig *Signature, args Values) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.AddRelocationInfo(funcRef FuncRef)
Instruction represents an instruction whose opcode is specified by Opcode. Since Go doesn't have union type, we use this flattened type for all instructions, and therefore each field has different meaning depending on Opcode. Arg returns the first argument to this instruction. Arg2 returns the first two arguments to this instruction. Arg2WithLane returns the first two arguments to this instruction, and the lane type. Arg3 returns the first three arguments to this instruction. ArgWithLane returns the first argument to this instruction, and the lane type. Args returns the arguments to this instruction. AsAtomicCas initializes this instruction as an atomic compare-and-swap. The size is in bytes and must be 1, 2, 4, or 8. AsAtomicLoad initializes this instruction as an atomic load. The size is in bytes and must be 1, 2, 4, or 8. AsAtomicRmw initializes this instruction as an atomic read-modify-write. The size is in bytes and must be 1, 2, 4, or 8. AsAtomicLoad initializes this instruction as an atomic store. The size is in bytes and must be 1, 2, 4, or 8. AsBand initializes this instruction as an integer bitwise and instruction with OpcodeBand. AsBitcast initializes this instruction as an instruction with OpcodeBitcast. AsBor initializes this instruction as an integer bitwise or instruction with OpcodeBor. AsBrTable initializes this instruction as a branch-table instruction with OpcodeBrTable. targets is a list of basic block IDs cast to Values. AsBrnz initializes this instruction as a branch-if-not-zero instruction with OpcodeBrnz. AsBrz initializes this instruction as a branch-if-zero instruction with OpcodeBrz. AsBxor initializes this instruction as an integer bitwise xor instruction with OpcodeBxor. AsCall initializes this instruction as a call instruction with OpcodeCall. AsCallGoRuntimeMemmove is the same as AsCallIndirect, but with a special flag set to indicate that it is a call to the Go runtime memmove function. AsCallIndirect initializes this instruction as a call-indirect instruction with OpcodeCallIndirect. AsCeil initializes this instruction as an instruction with OpcodeCeil. AsClz initializes this instruction as a Count Leading Zeroes instruction with OpcodeClz. AsCtz initializes this instruction as a Count Trailing Zeroes instruction with OpcodeCtz. AsExitIfTrueWithCode initializes this instruction as a trap instruction with OpcodeExitIfTrueWithCode. AsExitWithCode initializes this instruction as a trap instruction with OpcodeExitWithCode. AsExtIaddPairwise initializes this instruction as a lane-wise integer extended pairwise addition instruction with OpcodeIaddPairwise on a vector. AsExtLoad initializes this instruction as a store instruction with OpcodeLoad. AsExtractlane initializes this instruction as an extract lane instruction with OpcodeExtractlane on vector. AsF32const initializes this instruction as a 32-bit floating-point constant instruction with OpcodeF32const. AsF64const initializes this instruction as a 64-bit floating-point constant instruction with OpcodeF64const. AsFabs initializes this instruction as an instruction with OpcodeFabs. AsFadd initializes this instruction as a floating-point addition instruction with OpcodeFadd. AsFallthroughJump marks this instruction as a fallthrough jump. AsFcmp initializes this instruction as an integer comparison instruction with OpcodeFcmp. AsFcopysign initializes this instruction as an instruction with OpcodeFcopysign. AsFcvtFromInt initializes this instruction as an instruction with either OpcodeFcvtFromUint or OpcodeFcvtFromSint AsFcvtToInt initializes this instruction as an instruction with either OpcodeFcvtToUint or OpcodeFcvtToSint AsFdemote initializes this instruction as an instruction with OpcodeFdemote. AsFdiv initializes this instruction as a floating-point division instruction with OpcodeFdiv. AsFence initializes this instruction as a memory fence. A single byte immediate may be used to indicate fence ordering in the future but is currently always 0 and ignored. AsFloor initializes this instruction as an instruction with OpcodeFloor. AsFmax initializes this instruction to take the maximum of two floating-points with OpcodeFmax. AsFmin initializes this instruction to take the minimum of two floating-points with OpcodeFmin. AsFmul initializes this instruction as a floating-point multiplication instruction with OpcodeFmul. AsFneg initializes this instruction as an instruction with OpcodeFneg. AsFpromote initializes this instruction as an instruction with OpcodeFpromote. AsFsub initializes this instruction as a floating-point subtraction instruction with OpcodeFsub. AsFvdemote initializes this instruction as an instruction with OpcodeFvdemote AsFvpromoteLow initializes this instruction as an instruction with OpcodeFvpromoteLow AsIadd initializes this instruction as an integer addition instruction with OpcodeIadd. AsIcmp initializes this instruction as an integer comparison instruction with OpcodeIcmp. AsIconst32 initializes this instruction as a 32-bit integer constant instruction with OpcodeIconst. AsIconst64 initializes this instruction as a 64-bit integer constant instruction with OpcodeIconst. AsImul initializes this instruction as an integer addition instruction with OpcodeImul. AsInsertlane initializes this instruction as an insert lane instruction with OpcodeInsertlane on vector. AsIreduce initializes this instruction as a reduction instruction with OpcodeIreduce. AsIshl initializes this instruction as an integer shift left instruction with OpcodeIshl. AsIsub initializes this instruction as an integer subtraction instruction with OpcodeIsub. AsJump initializes this instruction as a jump instruction with OpcodeJump. AsLoad initializes this instruction as a store instruction with OpcodeLoad. AsLoadSplat initializes this instruction as a store instruction with OpcodeLoadSplat. AsNarrow initializes this instruction as an instruction with either OpcodeSnarrow or OpcodeUnarrow AsNearest initializes this instruction as an instruction with OpcodeNearest. AsPopcnt initializes this instruction as a Population Count instruction with OpcodePopcnt. AsReturn initializes this instruction as a return instruction with OpcodeReturn. AsRotl initializes this instruction as a word rotate left instruction with OpcodeRotl. AsRotr initializes this instruction as a word rotate right instruction with OpcodeRotr. AsSDiv initializes this instruction as an integer bitwise and instruction with OpcodeSdiv. AsSExtend initializes this instruction as a sign extension instruction with OpcodeSExtend. AsSRem initializes this instruction as an integer bitwise and instruction with OpcodeSrem. AsSelect initializes this instruction as an unsigned extension instruction with OpcodeSelect. AsShuffle initializes this instruction as a shuffle instruction with OpcodeShuffle on vector. AsSplat initializes this instruction as an insert lane instruction with OpcodeSplat on vector. AsSqmulRoundSat initializes this instruction as a lane-wise saturating rounding multiplication in Q15 format with OpcodeSqmulRoundSat on a vector. AsSqrt initializes this instruction as an instruction with OpcodeSqrt. AsSshr initializes this instruction as an integer signed shift right (arithmetic shift right) instruction with OpcodeSshr. AsStore initializes this instruction as a store instruction with OpcodeStore. AsSwizzle initializes this instruction as an insert lane instruction with OpcodeSwizzle on vector. AsTrunc initializes this instruction as an instruction with OpcodeTrunc. AsUDiv initializes this instruction as an integer bitwise and instruction with OpcodeUdiv. AsUExtend initializes this instruction as an unsigned extension instruction with OpcodeUExtend. AsURem initializes this instruction as an integer bitwise and instruction with OpcodeUrem. AsUshr initializes this instruction as an integer unsigned shift right (logical shift right) instruction with OpcodeUshr. AsVAvgRound initializes this instruction as an unsigned integer avg instruction, truncating to zero with OpcodeVAvgRound on a vector. AsVCeil initializes this instruction as an instruction with OpcodeCeil. AsVFabs initializes this instruction as a float abs instruction with OpcodeVFabs on a vector. AsVFadd initializes this instruction as a floating point add instruction with OpcodeVFadd on a vector. AsVFcmp initializes this instruction as a float comparison instruction with OpcodeVFcmp on Vector. AsVFcvtFromInt initializes this instruction as an instruction with either OpcodeVFcvtToSintSat or OpcodeVFcvtToUintSat AsVFcvtToIntSat initializes this instruction as an instruction with either OpcodeVFcvtToSintSat or OpcodeVFcvtToUintSat AsVFdiv initializes this instruction as a floating point division instruction with OpcodeVFdiv on a vector. AsVFloor initializes this instruction as an instruction with OpcodeFloor. AsVFmax initializes this instruction as a float max instruction with OpcodeVFmax on a vector. AsVFmin initializes this instruction as a float min instruction with OpcodeVFmin on a vector. AsVFmul initializes this instruction as a floating point multiplication instruction with OpcodeVFmul on a vector. AsVFneg initializes this instruction as a float neg instruction with OpcodeVFneg on a vector. AsVFsub initializes this instruction as a floating point subtraction instruction with OpcodeVFsub on a vector. AsVIabs initializes this instruction as a vector absolute value with OpcodeVIabs. AsVIadd initializes this instruction as an integer addition instruction with OpcodeVIadd on a vector. AsVIcmp initializes this instruction as an integer vector comparison instruction with OpcodeVIcmp. AsVImax initializes this instruction as a signed integer max instruction with OpcodeVImax on a vector. AsVImin initializes this instruction as a signed integer min instruction with OpcodeVImin on a vector. AsVImul initializes this instruction as an integer multiplication with OpcodeVImul on a vector. AsVIneg initializes this instruction as a vector negation with OpcodeVIneg. AsVIpopcnt initializes this instruction as a Population Count instruction with OpcodeVIpopcnt on a vector. AsVIshl initializes this instruction as an integer shift left instruction with OpcodeVIshl on vector. AsVIsub initializes this instruction as an integer subtraction instruction with OpcodeVIsub on a vector. AsVMaxPseudo initializes this instruction as an instruction with OpcodeVMaxPseudo. AsVMinPseudo initializes this instruction as an instruction with OpcodeVMinPseudo. AsVNearest initializes this instruction as an instruction with OpcodeNearest. AsVSaddSat initializes this instruction as a vector addition with saturation instruction with OpcodeVSaddSat on a vector. AsVSqrt initializes this instruction as a sqrt instruction with OpcodeVSqrt on a vector. AsVSshr initializes this instruction as an integer signed shift right (arithmetic shift right) instruction with OpcodeVSshr on vector. AsVSsubSat initializes this instruction as a vector addition with saturation instruction with OpcodeVSsubSat on a vector. AsVTrunc initializes this instruction as an instruction with OpcodeTrunc. AsVUaddSat initializes this instruction as a vector addition with saturation instruction with OpcodeVUaddSat on a vector. AsVUmax initializes this instruction as an unsigned integer max instruction with OpcodeVUmax on a vector. AsVUmin initializes this instruction as an unsigned integer min instruction with OpcodeVUmin on a vector. AsVUshr initializes this instruction as an integer unsigned shift right (logical shift right) instruction with OpcodeVUshr on vector. AsVUsubSat initializes this instruction as a vector addition with saturation instruction with OpcodeVUsubSat on a vector. AsVZeroExtLoad initializes this instruction as a store instruction with OpcodeVExtLoad. AsVallTrue initializes this instruction as an allTrue vector instruction with OpcodeVallTrue. AsVanyTrue initializes this instruction as an anyTrue vector instruction with OpcodeVanyTrue. AsVband initializes this instruction as an and vector instruction with OpcodeVband. AsVbandnot initializes this instruction as an and-not vector instruction with OpcodeVbandnot. AsVbitselect initializes this instruction as a bit select vector instruction with OpcodeVbitselect. AsVbnot initializes this instruction as a vector negation instruction with OpcodeVbnot. AsVbor initializes this instruction as an or vector instruction with OpcodeVbor. AsVbxor initializes this instruction as a xor vector instruction with OpcodeVbxor. AsVconst initializes this instruction as a vector constant instruction with OpcodeVconst. AsVhighBits initializes this instruction as a highBits vector instruction with OpcodeVhighBits. AsWiden initializes this instruction as a signed or unsigned widen instruction on low half or high half of the given vector with OpcodeSwidenLow, OpcodeUwidenLow, OpcodeSwidenHigh, OpcodeUwidenHigh. AsWideningPairwiseDotProductS initializes this instruction as a lane-wise integer extended pairwise addition instruction with OpcodeIaddPairwise on a vector. AtomicRmwData returns the data for this atomic read-modify-write instruction. AtomicTargetSize returns the target memory size of the atomic instruction. BitcastData returns the operands for a bitcast instruction. BrTableData returns the branch table data for this instruction necessary for backends. BranchData returns the branch data for this instruction necessary for backends. CallData returns the call data for this instruction necessary for backends. CallIndirectData returns the call indirect data for this instruction necessary for backends. Constant returns true if this instruction is a constant instruction. ConstantVal returns the constant value of this instruction. How to interpret the return value depends on the opcode. ExitIfTrueWithCodeData returns the context and exit code of OpcodeExitWithCode. ExitWithCodeData returns the context and exit code of OpcodeExitWithCode. ExtIaddPairwiseData returns the operands for a lane-wise integer extended pairwise addition instruction. (*Instruction) ExtendData() (from, to byte, signed bool) ExtendFromToBits returns the from and to bit size for the extension instruction. ExtractlaneData returns the operands and sign flag of Extractlane on vector. FcmpData returns the operands and comparison condition of this floating-point comparison instruction. Format returns a string representation of this instruction with the given builder. For debugging purposes only. GroupID returns the InstructionGroupID of this instruction. IcmpData returns the operands and comparison condition of this integer comparison instruction. (*Instruction) Insert(b Builder) *Instruction InsertlaneData returns the operands and sign flag of Insertlane on vector. InvertBrx inverts either OpcodeBrz or OpcodeBrnz to the other. IsBranching returns true if this instruction is a branching instruction. IsFallthroughJump returns true if this instruction is a fallthrough jump. LoadData returns the operands for a load instruction. LoadSplatData returns the operands for a load splat instruction. Lowered returns true if this instruction is already lowered. MarkLowered marks this instruction as already lowered. Next returns the next instruction laid out next to itself. Opcode returns the opcode of this instruction. Prev returns the previous instruction laid out prior to itself. Return returns a Value(s) produced by this instruction if any. If there's multiple return values, only the first one is returned. ReturnVals returns the return values of OpcodeReturn. Returns Value(s) produced by this instruction if any. The `first` is the first return value, and `rest` is the rest of the values. SelectData returns the select data for this instruction necessary for backends. ShuffleData returns the first two arguments to this instruction and 2 uint64s `lo`, `hi`. Note: Each uint64 encodes a sequence of 8 bytes where each byte encodes a VecLane, so that the 128bit integer `hi<<64|lo` packs a slice `[16]VecLane`, where `lane[0]` is the least significant byte, and `lane[n]` is shifted to offset `n*8`. SourceOffset returns the source offset of this instruction. StoreData returns the operands for a store instruction. VFcmpData returns the operands and comparison condition of this float comparison instruction on vector. VIcmpData returns the operands and comparison condition of this integer comparison instruction on vector. VZeroExtLoadData returns the operands for a load instruction. The returned `typ` is the scalar type of the load target. VconstData returns the operands of this vector constant instruction. func BasicBlock.Root() *Instruction func BasicBlock.Tail() *Instruction func Builder.AllocateInstruction() *Instruction func Builder.InstructionOfValue(v Value) *Instruction func (*Instruction).AsAtomicCas(addr, exp, repl Value, size uint64) *Instruction func (*Instruction).AsAtomicLoad(addr Value, size uint64, typ Type) *Instruction func (*Instruction).AsAtomicRmw(op AtomicRmwOp, addr, val Value, size uint64) *Instruction func (*Instruction).AsAtomicStore(addr, val Value, size uint64) *Instruction func (*Instruction).AsBand(x, amount Value) *Instruction func (*Instruction).AsBitcast(x Value, dstType Type) *Instruction func (*Instruction).AsBrnz(v Value, args Values, target BasicBlock) *Instruction func (*Instruction).AsCallGoRuntimeMemmove(funcPtr Value, sig *Signature, args Values) *Instruction func (*Instruction).AsCallIndirect(funcPtr Value, sig *Signature, args Values) *Instruction func (*Instruction).AsCeil(x Value) *Instruction func (*Instruction).AsExitIfTrueWithCode(ctx, c Value, code wazevoapi.ExitCode) *Instruction func (*Instruction).AsExtIaddPairwise(x Value, srcLane VecLane, signed bool) *Instruction func (*Instruction).AsExtLoad(op Opcode, ptr Value, offset uint32, dst64bit bool) *Instruction func (*Instruction).AsExtractlane(x Value, index byte, lane VecLane, signed bool) *Instruction func (*Instruction).AsF32const(f float32) *Instruction func (*Instruction).AsF64const(f float64) *Instruction func (*Instruction).AsFabs(x Value) *Instruction func (*Instruction).AsFcopysign(x, y Value) *Instruction func (*Instruction).AsFcvtFromInt(x Value, signed bool, dst64bit bool) *Instruction func (*Instruction).AsFcvtToInt(x, ctx Value, signed bool, dst64bit bool, sat bool) *Instruction func (*Instruction).AsFence(order byte) *Instruction func (*Instruction).AsFloor(x Value) *Instruction func (*Instruction).AsFneg(x Value) *Instruction func (*Instruction).AsFvdemote(x Value, lane VecLane) *Instruction func (*Instruction).AsFvpromoteLow(x Value, lane VecLane) *Instruction func (*Instruction).AsIadd(x, y Value) *Instruction func (*Instruction).AsIcmp(x, y Value, c IntegerCmpCond) *Instruction func (*Instruction).AsIconst32(v uint32) *Instruction func (*Instruction).AsIconst64(v uint64) *Instruction func (*Instruction).AsImul(x, y Value) *Instruction func (*Instruction).AsInsertlane(x, y Value, index byte, lane VecLane) *Instruction func (*Instruction).AsIreduce(v Value, dstType Type) *Instruction func (*Instruction).AsIshl(x, amount Value) *Instruction func (*Instruction).AsIsub(x, y Value) *Instruction func (*Instruction).AsJump(vs Values, target BasicBlock) *Instruction func (*Instruction).AsLoad(ptr Value, offset uint32, typ Type) *Instruction func (*Instruction).AsLoadSplat(ptr Value, offset uint32, lane VecLane) *Instruction func (*Instruction).AsNarrow(x, y Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsNearest(x Value) *Instruction func (*Instruction).AsReturn(vs wazevoapi.VarLength[Value]) *Instruction func (*Instruction).AsSDiv(x, y, ctx Value) *Instruction func (*Instruction).AsSelect(c, x, y Value) *Instruction func (*Instruction).AsSExtend(v Value, from, to byte) *Instruction func (*Instruction).AsShuffle(x, y Value, lane []byte) *Instruction func (*Instruction).AsSplat(x Value, lane VecLane) *Instruction func (*Instruction).AsSqmulRoundSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsSqrt(x Value) *Instruction func (*Instruction).AsSRem(x, y, ctx Value) *Instruction func (*Instruction).AsSshr(x, amount Value) *Instruction func (*Instruction).AsStore(storeOp Opcode, value, ptr Value, offset uint32) *Instruction func (*Instruction).AsSwizzle(x, y Value, lane VecLane) *Instruction func (*Instruction).AsTrunc(x Value) *Instruction func (*Instruction).AsUDiv(x, y, ctx Value) *Instruction func (*Instruction).AsUExtend(v Value, from, to byte) *Instruction func (*Instruction).AsURem(x, y, ctx Value) *Instruction func (*Instruction).AsUshr(x, amount Value) *Instruction func (*Instruction).AsVallTrue(x Value, lane VecLane) *Instruction func (*Instruction).AsVanyTrue(x Value) *Instruction func (*Instruction).AsVAvgRound(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVband(x, y Value) *Instruction func (*Instruction).AsVbandnot(x, y Value) *Instruction func (*Instruction).AsVbitselect(c, x, y Value) *Instruction func (*Instruction).AsVbnot(v Value) *Instruction func (*Instruction).AsVbor(x, y Value) *Instruction func (*Instruction).AsVbxor(x, y Value) *Instruction func (*Instruction).AsVCeil(x Value, lane VecLane) *Instruction func (*Instruction).AsVconst(lo, hi uint64) *Instruction func (*Instruction).AsVFabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVFadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFcmp(x, y Value, c FloatCmpCond, lane VecLane) *Instruction func (*Instruction).AsVFcvtFromInt(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFcvtToIntSat(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFdiv(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFloor(x Value, lane VecLane) *Instruction func (*Instruction).AsVFmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVFsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVhighBits(x Value, lane VecLane) *Instruction func (*Instruction).AsVIabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVIadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIcmp(x, y Value, c IntegerCmpCond, lane VecLane) *Instruction func (*Instruction).AsVImax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVIpopcnt(x Value, lane VecLane) *Instruction func (*Instruction).AsVIshl(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVIsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMaxPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMinPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVNearest(x Value, lane VecLane) *Instruction func (*Instruction).AsVSaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVSqrt(x Value, lane VecLane) *Instruction func (*Instruction).AsVSshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVSsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVTrunc(x Value, lane VecLane) *Instruction func (*Instruction).AsVUaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVUsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVZeroExtLoad(ptr Value, offset uint32, scalarType Type) *Instruction func (*Instruction).AsWiden(v Value, lane VecLane, signed, low bool) *Instruction func (*Instruction).AsWideningPairwiseDotProductS(x, y Value) *Instruction func (*Instruction).Insert(b Builder) *Instruction func (*Instruction).Next() *Instruction func (*Instruction).Prev() *Instruction func Builder.InsertInstruction(raw *Instruction) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.InsertLoadConstantBlockArg(instr *Instruction, vr regalloc.VReg) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LowerConditionalBranch(b *Instruction) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LowerInstr(*Instruction) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LowerSingleBranch(b *Instruction)
InstructionGroupID is assigned to each instruction and represents a group of instructions where each instruction is interchangeable with others except for the last instruction in the group which has side effects. In short, InstructionGroupID is determined by the side effects of instructions. That means, if there's an instruction with side effect between two instructions, then these two instructions will have different instructionGroupID. Note that each block always ends with branching, which is with side effects, therefore, instructions in different blocks always have different InstructionGroupID(s). The notable application of this is used in lowering SSA-level instruction to a ISA specific instruction, where we eagerly try to merge multiple instructions into single operation etc. Such merging cannot be done if these instruction have different InstructionGroupID since it will change the semantics of a program. See passDeadCodeElimination. func (*Instruction).GroupID() InstructionGroupID
IntegerCmpCond represents a condition for integer comparison. Signed returns true if the condition is signed integer comparison. String implements fmt.Stringer. IntegerCmpCond : expvar.Var IntegerCmpCond : fmt.Stringer func (*Instruction).IcmpData() (x, y Value, c IntegerCmpCond) func (*Instruction).VIcmpData() (x, y Value, c IntegerCmpCond, l VecLane) func (*Instruction).AsIcmp(x, y Value, c IntegerCmpCond) *Instruction func (*Instruction).AsVIcmp(x, y Value, c IntegerCmpCond, lane VecLane) *Instruction const IntegerCmpCondEqual const IntegerCmpCondInvalid const IntegerCmpCondNotEqual const IntegerCmpCondSignedGreaterThan const IntegerCmpCondSignedGreaterThanOrEqual const IntegerCmpCondSignedLessThan const IntegerCmpCondSignedLessThanOrEqual const IntegerCmpCondUnsignedGreaterThan const IntegerCmpCondUnsignedGreaterThanOrEqual const IntegerCmpCondUnsignedLessThan const IntegerCmpCondUnsignedLessThanOrEqual
Opcode represents a SSA instruction. String implements fmt.Stringer. Opcode : expvar.Var Opcode : fmt.Stringer func (*Instruction).Opcode() Opcode func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.MatchInstrOneOf(def backend.SSAValueDefinition, opcodes []Opcode) Opcode func (*Instruction).AsExtLoad(op Opcode, ptr Value, offset uint32, dst64bit bool) *Instruction func (*Instruction).AsStore(storeOp Opcode, value, ptr Value, offset uint32) *Instruction func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.MatchInstr(def backend.SSAValueDefinition, opcode Opcode) bool func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.MatchInstrOneOf(def backend.SSAValueDefinition, opcodes []Opcode) Opcode const OpcodeAtomicCas const OpcodeAtomicLoad const OpcodeAtomicRmw const OpcodeAtomicStore const OpcodeBand const OpcodeBitcast const OpcodeBnot const OpcodeBor const OpcodeBrnz const OpcodeBrTable const OpcodeBrz const OpcodeBxor const OpcodeCall const OpcodeCallIndirect const OpcodeCeil const OpcodeClz const OpcodeCtz const OpcodeExitIfTrueWithCode const OpcodeExitWithCode const OpcodeExtIaddPairwise const OpcodeExtractlane const OpcodeF32const const OpcodeF64const const OpcodeFabs const OpcodeFadd const OpcodeFcmp const OpcodeFcopysign const OpcodeFcvtFromSint const OpcodeFcvtFromUint const OpcodeFcvtToSint const OpcodeFcvtToSintSat const OpcodeFcvtToUint const OpcodeFcvtToUintSat const OpcodeFdemote const OpcodeFdiv const OpcodeFence const OpcodeFloor const OpcodeFmax const OpcodeFmin const OpcodeFmul const OpcodeFneg const OpcodeFpromote const OpcodeFsub const OpcodeFvdemote const OpcodeFvpromoteLow const OpcodeIadd const OpcodeIcmp const OpcodeIcmpImm const OpcodeIconst const OpcodeImul const OpcodeInsertlane const OpcodeInvalid const OpcodeIreduce const OpcodeIshl const OpcodeIstore16 const OpcodeIstore32 const OpcodeIstore8 const OpcodeIsub const OpcodeJump const OpcodeLoad const OpcodeLoadSplat const OpcodeNearest const OpcodePopcnt const OpcodeReturn const OpcodeRotl const OpcodeRotr const OpcodeSdiv const OpcodeSelect const OpcodeSExtend const OpcodeShuffle const OpcodeSload16 const OpcodeSload32 const OpcodeSload8 const OpcodeSnarrow const OpcodeSplat const OpcodeSqmulRoundSat const OpcodeSqrt const OpcodeSrem const OpcodeSshr const OpcodeStore const OpcodeSwidenHigh const OpcodeSwidenLow const OpcodeSwizzle const OpcodeTrunc const OpcodeUdiv const OpcodeUExtend const OpcodeUload16 const OpcodeUload32 const OpcodeUload8 const OpcodeUnarrow const OpcodeUndefined const OpcodeUrem const OpcodeUshr const OpcodeUwidenHigh const OpcodeUwidenLow const OpcodeVallTrue const OpcodeVanyTrue const OpcodeVAvgRound const OpcodeVband const OpcodeVbandnot const OpcodeVbitselect const OpcodeVbnot const OpcodeVbor const OpcodeVbxor const OpcodeVCeil const OpcodeVconst const OpcodeVFabs const OpcodeVFadd const OpcodeVFcmp const OpcodeVFcvtFromSint const OpcodeVFcvtFromUint const OpcodeVFcvtToSintSat const OpcodeVFcvtToUintSat const OpcodeVFdiv const OpcodeVFloor const OpcodeVFmax const OpcodeVFmin const OpcodeVFmul const OpcodeVFneg const OpcodeVFsub const OpcodeVhighBits const OpcodeVIabs const OpcodeVIadd const OpcodeVIcmp const OpcodeVImax const OpcodeVImin const OpcodeVImul const OpcodeVIneg const OpcodeVIpopcnt const OpcodeVIshl const OpcodeVIsub const OpcodeVMaxPseudo const OpcodeVMinPseudo const OpcodeVNearest const OpcodeVSaddSat const OpcodeVSqrt const OpcodeVSshr const OpcodeVSsubSat const OpcodeVTrunc const OpcodeVUaddSat const OpcodeVUmax const OpcodeVUmin const OpcodeVUshr const OpcodeVUsubSat const OpcodeVZeroExtLoad const OpcodeWideningPairwiseDotProductS
Signature is a function prototype. ID is a unique identifier for this signature used to lookup. Params and Results are the types of the parameters and results of the function. Params and Results are the types of the parameters and results of the function. String implements fmt.Stringer. *Signature : expvar.Var *Signature : fmt.Stringer func Builder.ResolveSignature(id SignatureID) *Signature func Builder.Signature() *Signature func Builder.Signatures() []*Signature func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.SignatureForListener(wasmSig *wasm.FunctionType) (*Signature, *Signature) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.SignatureForListener(wasmSig *wasm.FunctionType) (*Signature, *Signature) func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.SignatureForWasmFunctionType(typ *wasm.FunctionType) Signature func Builder.DeclareSignature(signature *Signature) func Builder.Init(typ *Signature) func (*Instruction).AsCall(ref FuncRef, sig *Signature, args Values) func (*Instruction).AsCallGoRuntimeMemmove(funcPtr Value, sig *Signature, args Values) *Instruction func (*Instruction).AsCallIndirect(funcPtr Value, sig *Signature, args Values) *Instruction func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.GoFunctionCallRequiredStackSize(sig *Signature, argBegin int) (ret, retUnaligned int64) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.GetFunctionABI(sig *Signature) *backend.FunctionABI func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.(*FunctionABI).Init(sig *Signature, argResultInts, argResultFloats []regalloc.RealReg) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.CompileEntryPreamble(signature *Signature) []byte func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.CompileGoFunctionTrampoline(exitCode wazevoapi.ExitCode, sig *Signature, needModuleContextPtr bool) []byte
SignatureID is an unique identifier used to lookup. String implements fmt.Stringer. SignatureID : expvar.Var SignatureID : fmt.Stringer func (*Instruction).CallData() (ref FuncRef, sigID SignatureID, args []Value) func (*Instruction).CallIndirectData() (funcPtr Value, sigID SignatureID, args []Value, isGoMemmove bool) func Builder.ResolveSignature(id SignatureID) *Signature
SourceOffset represents the offset of the source of an instruction. Valid returns true if this source offset is valid. func (*Instruction).SourceOffset() SourceOffset func Builder.SetCurrentSourceOffset(line SourceOffset) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.AddSourceOffsetInfo(executableOffset int64, sourceOffset SourceOffset)
Bits returns the number of bits required to represent the type. IsFloat returns true if the type is a floating point type. IsInt returns true if the type is an integer type. Size returns the number of bytes required to represent the type. String implements fmt.Stringer. Type : expvar.Var Type : fmt.Stringer func (*Instruction).BitcastData() (x Value, dstType Type) func (*Instruction).LoadData() (ptr Value, offset uint32, typ Type) func (*Instruction).VZeroExtLoadData() (ptr Value, offset uint32, typ Type) func Value.Type() Type func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.TypeOf(regalloc.VReg) Type func github.com/tetratelabs/wazero/internal/engine/wazevo/frontend.WasmTypeToSSAType(vt wasm.ValueType) Type func BasicBlock.AddParam(b Builder, t Type) Value func Builder.DeclareVariable(Type) Variable func Builder.InsertZeroValue(t Type) func (*Instruction).AsAtomicLoad(addr Value, size uint64, typ Type) *Instruction func (*Instruction).AsBitcast(x Value, dstType Type) *Instruction func (*Instruction).AsIreduce(v Value, dstType Type) *Instruction func (*Instruction).AsLoad(ptr Value, offset uint32, typ Type) *Instruction func (*Instruction).AsVZeroExtLoad(ptr Value, offset uint32, scalarType Type) *Instruction func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.AllocateVReg(typ Type) regalloc.VReg func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.InsertMove(dst, src regalloc.VReg, typ Type) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend/regalloc.RegTypeOf(p Type) regalloc.RegType const TypeF32 const TypeF64 const TypeI32 const TypeI64 const TypeV128
Value represents an SSA value with a type information. The relationship with Variable is 1: N (including 0), that means there might be multiple Variable(s) for a Value. 32 to 59-bit is used to store the unique identifier of the Instruction that generates this value if any. 60 to 63-bit is used to store Type for this value. Format creates a debug string for this Value using the data stored in Builder. ID returns the valueID of this value. Type returns the Type of this value. Valid returns true if this value is valid. func BasicBlock.AddParam(b Builder, t Type) Value func BasicBlock.Param(i int) Value func Builder.FindValueInLinearPath(variable Variable) Value func Builder.MustFindValue(variable Variable) Value func (*Instruction).Arg() Value func (*Instruction).Arg2() (Value, Value) func (*Instruction).Arg2() (Value, Value) func (*Instruction).Arg2WithLane() (Value, Value, VecLane) func (*Instruction).Arg2WithLane() (Value, Value, VecLane) func (*Instruction).Arg3() (Value, Value, Value) func (*Instruction).Arg3() (Value, Value, Value) func (*Instruction).Arg3() (Value, Value, Value) func (*Instruction).Args() (v1, v2, v3 Value, vs []Value) func (*Instruction).Args() (v1, v2, v3 Value, vs []Value) func (*Instruction).ArgWithLane() (Value, VecLane) func (*Instruction).BitcastData() (x Value, dstType Type) func (*Instruction).BranchData() (condVal Value, blockArgs []Value, target BasicBlockID) func (*Instruction).BranchData() (condVal Value, blockArgs []Value, target BasicBlockID) func (*Instruction).BrTableData() (index Value, targets Values) func (*Instruction).CallData() (ref FuncRef, sigID SignatureID, args []Value) func (*Instruction).CallIndirectData() (funcPtr Value, sigID SignatureID, args []Value, isGoMemmove bool) func (*Instruction).CallIndirectData() (funcPtr Value, sigID SignatureID, args []Value, isGoMemmove bool) func (*Instruction).ExitIfTrueWithCodeData() (ctx, c Value, code wazevoapi.ExitCode) func (*Instruction).ExitWithCodeData() (ctx Value, code wazevoapi.ExitCode) func (*Instruction).ExtIaddPairwiseData() (x Value, srcLane VecLane, signed bool) func (*Instruction).ExtractlaneData() (x Value, index byte, signed bool, l VecLane) func (*Instruction).FcmpData() (x, y Value, c FloatCmpCond) func (*Instruction).IcmpData() (x, y Value, c IntegerCmpCond) func (*Instruction).InsertlaneData() (x, y Value, index byte, l VecLane) func (*Instruction).LoadData() (ptr Value, offset uint32, typ Type) func (*Instruction).LoadSplatData() (ptr Value, offset uint32, lane VecLane) func (*Instruction).Return() (first Value) func (*Instruction).Returns() (first Value, rest []Value) func (*Instruction).Returns() (first Value, rest []Value) func (*Instruction).ReturnVals() []Value func (*Instruction).SelectData() (c, x, y Value) func (*Instruction).ShuffleData() (v Value, v2 Value, lo uint64, hi uint64) func (*Instruction).ShuffleData() (v Value, v2 Value, lo uint64, hi uint64) func (*Instruction).StoreData() (value, ptr Value, offset uint32, storeSizeInBits byte) func (*Instruction).VFcmpData() (x, y Value, c FloatCmpCond, l VecLane) func (*Instruction).VIcmpData() (x, y Value, c IntegerCmpCond, l VecLane) func (*Instruction).VZeroExtLoadData() (ptr Value, offset uint32, typ Type) func Builder.AnnotateValue(value Value, annotation string) func Builder.DefineVariable(variable Variable, value Value, block BasicBlock) func Builder.DefineVariableInCurrentBB(variable Variable, value Value) func Builder.InstructionOfValue(v Value) *Instruction func (*Instruction).AsAtomicCas(addr, exp, repl Value, size uint64) *Instruction func (*Instruction).AsAtomicLoad(addr Value, size uint64, typ Type) *Instruction func (*Instruction).AsAtomicRmw(op AtomicRmwOp, addr, val Value, size uint64) *Instruction func (*Instruction).AsAtomicStore(addr, val Value, size uint64) *Instruction func (*Instruction).AsBand(x, amount Value) *Instruction func (*Instruction).AsBitcast(x Value, dstType Type) *Instruction func (*Instruction).AsBor(x, amount Value) func (*Instruction).AsBrnz(v Value, args Values, target BasicBlock) *Instruction func (*Instruction).AsBrTable(index Value, targets Values) func (*Instruction).AsBrz(v Value, args Values, target BasicBlock) func (*Instruction).AsBxor(x, amount Value) func (*Instruction).AsCallGoRuntimeMemmove(funcPtr Value, sig *Signature, args Values) *Instruction func (*Instruction).AsCallIndirect(funcPtr Value, sig *Signature, args Values) *Instruction func (*Instruction).AsCeil(x Value) *Instruction func (*Instruction).AsClz(x Value) func (*Instruction).AsCtz(x Value) func (*Instruction).AsExitIfTrueWithCode(ctx, c Value, code wazevoapi.ExitCode) *Instruction func (*Instruction).AsExitWithCode(ctx Value, code wazevoapi.ExitCode) func (*Instruction).AsExtIaddPairwise(x Value, srcLane VecLane, signed bool) *Instruction func (*Instruction).AsExtLoad(op Opcode, ptr Value, offset uint32, dst64bit bool) *Instruction func (*Instruction).AsExtractlane(x Value, index byte, lane VecLane, signed bool) *Instruction func (*Instruction).AsFabs(x Value) *Instruction func (*Instruction).AsFadd(x, y Value) func (*Instruction).AsFcmp(x, y Value, c FloatCmpCond) func (*Instruction).AsFcopysign(x, y Value) *Instruction func (*Instruction).AsFcvtFromInt(x Value, signed bool, dst64bit bool) *Instruction func (*Instruction).AsFcvtToInt(x, ctx Value, signed bool, dst64bit bool, sat bool) *Instruction func (*Instruction).AsFdemote(x Value) func (*Instruction).AsFdiv(x, y Value) func (*Instruction).AsFloor(x Value) *Instruction func (*Instruction).AsFmax(x, y Value) func (*Instruction).AsFmin(x, y Value) func (*Instruction).AsFmul(x, y Value) func (*Instruction).AsFneg(x Value) *Instruction func (*Instruction).AsFpromote(x Value) func (*Instruction).AsFsub(x, y Value) func (*Instruction).AsFvdemote(x Value, lane VecLane) *Instruction func (*Instruction).AsFvpromoteLow(x Value, lane VecLane) *Instruction func (*Instruction).AsIadd(x, y Value) *Instruction func (*Instruction).AsIcmp(x, y Value, c IntegerCmpCond) *Instruction func (*Instruction).AsImul(x, y Value) *Instruction func (*Instruction).AsInsertlane(x, y Value, index byte, lane VecLane) *Instruction func (*Instruction).AsIreduce(v Value, dstType Type) *Instruction func (*Instruction).AsIshl(x, amount Value) *Instruction func (*Instruction).AsIsub(x, y Value) *Instruction func (*Instruction).AsLoad(ptr Value, offset uint32, typ Type) *Instruction func (*Instruction).AsLoadSplat(ptr Value, offset uint32, lane VecLane) *Instruction func (*Instruction).AsNarrow(x, y Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsNearest(x Value) *Instruction func (*Instruction).AsPopcnt(x Value) func (*Instruction).AsRotl(x, amount Value) func (*Instruction).AsRotr(x, amount Value) func (*Instruction).AsSDiv(x, y, ctx Value) *Instruction func (*Instruction).AsSelect(c, x, y Value) *Instruction func (*Instruction).AsSExtend(v Value, from, to byte) *Instruction func (*Instruction).AsShuffle(x, y Value, lane []byte) *Instruction func (*Instruction).AsSplat(x Value, lane VecLane) *Instruction func (*Instruction).AsSqmulRoundSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsSqrt(x Value) *Instruction func (*Instruction).AsSRem(x, y, ctx Value) *Instruction func (*Instruction).AsSshr(x, amount Value) *Instruction func (*Instruction).AsStore(storeOp Opcode, value, ptr Value, offset uint32) *Instruction func (*Instruction).AsSwizzle(x, y Value, lane VecLane) *Instruction func (*Instruction).AsTrunc(x Value) *Instruction func (*Instruction).AsUDiv(x, y, ctx Value) *Instruction func (*Instruction).AsUExtend(v Value, from, to byte) *Instruction func (*Instruction).AsURem(x, y, ctx Value) *Instruction func (*Instruction).AsUshr(x, amount Value) *Instruction func (*Instruction).AsVallTrue(x Value, lane VecLane) *Instruction func (*Instruction).AsVanyTrue(x Value) *Instruction func (*Instruction).AsVAvgRound(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVband(x, y Value) *Instruction func (*Instruction).AsVbandnot(x, y Value) *Instruction func (*Instruction).AsVbitselect(c, x, y Value) *Instruction func (*Instruction).AsVbnot(v Value) *Instruction func (*Instruction).AsVbor(x, y Value) *Instruction func (*Instruction).AsVbxor(x, y Value) *Instruction func (*Instruction).AsVCeil(x Value, lane VecLane) *Instruction func (*Instruction).AsVFabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVFadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFcmp(x, y Value, c FloatCmpCond, lane VecLane) *Instruction func (*Instruction).AsVFcvtFromInt(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFcvtToIntSat(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFdiv(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFloor(x Value, lane VecLane) *Instruction func (*Instruction).AsVFmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVFsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVhighBits(x Value, lane VecLane) *Instruction func (*Instruction).AsVIabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVIadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIcmp(x, y Value, c IntegerCmpCond, lane VecLane) *Instruction func (*Instruction).AsVImax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVIpopcnt(x Value, lane VecLane) *Instruction func (*Instruction).AsVIshl(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVIsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMaxPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMinPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVNearest(x Value, lane VecLane) *Instruction func (*Instruction).AsVSaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVSqrt(x Value, lane VecLane) *Instruction func (*Instruction).AsVSshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVSsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVTrunc(x Value, lane VecLane) *Instruction func (*Instruction).AsVUaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVUsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVZeroExtLoad(ptr Value, offset uint32, scalarType Type) *Instruction func (*Instruction).AsWiden(v Value, lane VecLane, signed, low bool) *Instruction func (*Instruction).AsWideningPairwiseDotProductS(x, y Value) *Instruction func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.ValueDefinition(Value) backend.SSAValueDefinition func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Compiler.VRegOf(value Value) regalloc.VReg func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LowerParams(params []Value) func github.com/tetratelabs/wazero/internal/engine/wazevo/backend.Machine.LowerReturns(returns []Value) const ValueInvalid
ValueID is the lower 32bit of Value, which is the pure identifier of Value without type info. func Value.ID() ValueID
ValueInfo contains the data per Value used to lower the SSA in backend. RefCount is the reference count of the Value. func Builder.ValuesInfo() []ValueInfo
Values is a slice of Value. Use this instead of []Value to reuse the underlying memory.
Variable is a unique identifier for a source program's variable and will correspond to multiple ssa Value(s). For example, `Local 1` is a Variable in WebAssembly, and Value(s) will be created for it whenever it executes `local.set 1`. Variable is useful to track the SSA Values of a variable in the source program, and can be used to find the corresponding latest SSA Value via Builder.FindValue. Higher 4-bit is used to store Type for this variable. String implements fmt.Stringer. Variable : expvar.Var Variable : fmt.Stringer func Builder.DeclareVariable(Type) Variable func Builder.DefineVariable(variable Variable, value Value, block BasicBlock) func Builder.DefineVariableInCurrentBB(variable Variable, value Value) func Builder.FindValueInLinearPath(variable Variable) Value func Builder.MustFindValue(variable Variable) Value
VecLane represents a lane in a SIMD vector. String implements fmt.Stringer. VecLane : expvar.Var VecLane : fmt.Stringer func (*Instruction).Arg2WithLane() (Value, Value, VecLane) func (*Instruction).ArgWithLane() (Value, VecLane) func (*Instruction).ExtIaddPairwiseData() (x Value, srcLane VecLane, signed bool) func (*Instruction).ExtractlaneData() (x Value, index byte, signed bool, l VecLane) func (*Instruction).InsertlaneData() (x, y Value, index byte, l VecLane) func (*Instruction).LoadSplatData() (ptr Value, offset uint32, lane VecLane) func (*Instruction).VFcmpData() (x, y Value, c FloatCmpCond, l VecLane) func (*Instruction).VIcmpData() (x, y Value, c IntegerCmpCond, l VecLane) func (*Instruction).AsExtIaddPairwise(x Value, srcLane VecLane, signed bool) *Instruction func (*Instruction).AsExtractlane(x Value, index byte, lane VecLane, signed bool) *Instruction func (*Instruction).AsFvdemote(x Value, lane VecLane) *Instruction func (*Instruction).AsFvpromoteLow(x Value, lane VecLane) *Instruction func (*Instruction).AsInsertlane(x, y Value, index byte, lane VecLane) *Instruction func (*Instruction).AsLoadSplat(ptr Value, offset uint32, lane VecLane) *Instruction func (*Instruction).AsNarrow(x, y Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsSplat(x Value, lane VecLane) *Instruction func (*Instruction).AsSqmulRoundSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsSwizzle(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVallTrue(x Value, lane VecLane) *Instruction func (*Instruction).AsVAvgRound(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVCeil(x Value, lane VecLane) *Instruction func (*Instruction).AsVFabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVFadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFcmp(x, y Value, c FloatCmpCond, lane VecLane) *Instruction func (*Instruction).AsVFcvtFromInt(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFcvtToIntSat(x Value, lane VecLane, signed bool) *Instruction func (*Instruction).AsVFdiv(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFloor(x Value, lane VecLane) *Instruction func (*Instruction).AsVFmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFmul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVFneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVFsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVhighBits(x Value, lane VecLane) *Instruction func (*Instruction).AsVIabs(x Value, lane VecLane) *Instruction func (*Instruction).AsVIadd(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIcmp(x, y Value, c IntegerCmpCond, lane VecLane) *Instruction func (*Instruction).AsVImax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVImul(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVIneg(x Value, lane VecLane) *Instruction func (*Instruction).AsVIpopcnt(x Value, lane VecLane) *Instruction func (*Instruction).AsVIshl(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVIsub(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMaxPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVMinPseudo(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVNearest(x Value, lane VecLane) *Instruction func (*Instruction).AsVSaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVSqrt(x Value, lane VecLane) *Instruction func (*Instruction).AsVSshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVSsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVTrunc(x Value, lane VecLane) *Instruction func (*Instruction).AsVUaddSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmax(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUmin(x, y Value, lane VecLane) *Instruction func (*Instruction).AsVUshr(x, amount Value, lane VecLane) *Instruction func (*Instruction).AsVUsubSat(x, y Value, lane VecLane) *Instruction func (*Instruction).AsWiden(v Value, lane VecLane, signed, low bool) *Instruction const VecLaneF32x4 const VecLaneF64x2 const VecLaneI16x8 const VecLaneI32x4 const VecLaneI64x2 const VecLaneI8x16 const VecLaneInvalid
Package-Level Functions (only one)
NewBuilder returns a new Builder implementation.
Package-Level Variables (only one)
ValuesNil is a nil Values.
Package-Level Constants (total 183)
AtomicRmwOpAdd is an atomic add operation.
AtomicRmwOpAnd is an atomic and operation.
AtomicRmwOpOr is an atomic or operation.
AtomicRmwOpSub is an atomic sub operation.
AtomicRmwOpXchg is an atomic swap operation.
AtomicRmwOpXor is an atomic xor operation.
FloatCmpCondEqual represents "==".
FloatCmpCondGreaterThan represents ">".
FloatCmpCondGreaterThanOrEqual represents ">=".
FloatCmpCondInvalid represents an invalid condition.
FloatCmpCondLessThan represents "<".
FloatCmpCondLessThanOrEqual represents "<=".
FloatCmpCondNotEqual represents "!=".
IntegerCmpCondEqual represents "==".
IntegerCmpCondInvalid represents an invalid condition.
IntegerCmpCondNotEqual represents "!=".
IntegerCmpCondSignedGreaterThan represents Signed ">".
IntegerCmpCondSignedGreaterThanOrEqual represents Signed ">=".
IntegerCmpCondSignedLessThan represents Signed "<".
IntegerCmpCondSignedLessThanOrEqual represents Signed "<=".
IntegerCmpCondUnsignedGreaterThan represents Unsigned ">".
IntegerCmpCondUnsignedGreaterThanOrEqual represents Unsigned ">=".
IntegerCmpCondUnsignedLessThan represents Unsigned "<".
IntegerCmpCondUnsignedLessThanOrEqual represents Unsigned "<=".
OpcodeAtomicCas is atomic compare-and-swap operation.
OpcodeAtomicLoad is atomic load operation.
OpcodeAtomicRmw is atomic read-modify-write operation: `v = atomic_rmw op, p, offset, value`.
OpcodeAtomicStore is atomic store operation.
OpcodeBand performs a binary and: `v = Band x, y`.
OpcodeBitcast is a bitcast operation: `v = bitcast x`.
OpcodeBnot performs a binary not: `v = Bnot x`.
OpcodeBor performs a binary or: `v = Bor x, y`.
OpcodeBrnz branches into `blk` with `args` if the value `c` is not zero: `Brnz c, blk, args`.
OpcodeBrTable takes the index value `index`, and branches into `labelX`. If the `index` is out of range, it branches into the last labelN: `BrTable index, [label1, label2, ... labelN]`.
OpcodeBrz branches into `blk` with `args` if the value `c` equals zero: `Brz c, blk, args`.
OpcodeBxor performs a binary xor: `v = Bxor x, y`.
OpcodeCall calls a function specified by the symbol FN with arguments `args`: `returnvals = Call FN, args...` This is a "near" call, which means the call target is known at compile time, and the target is relatively close to this function. If the target cannot be reached by near call, the backend fails to compile.
OpcodeCallIndirect calls a function specified by `callee` which is a function address: `returnvals = call_indirect SIG, callee, args`. Note that this is different from call_indirect in Wasm, which also does type checking, etc.
OpcodeCeil takes the ceiling of the given floating point value: `v = ceil x`.
OpcodeClz counts the number of leading zeros: `v = clz x`.
OpcodeCtz counts the number of trailing zeros: `v = ctz x`.
OpcodeExitIfTrueWithCode exits the execution immediately if the value `c` is not zero.
OpcodeExitWithCode exit the execution immediately.
OpcodeExtIaddPairwise is a lane-wise integer extended pairwise addition producing extended results (twice wider results than the inputs): `v = extiadd_pairwise x, y` on vector.
OpcodeExtractlane extracts a lane value from a vector: `v = ExtractLane x, Idx`.
OpcodeF32const represents the single-precision const.
OpcodeF64const represents the double-precision const.
OpcodeFabs takes the absolute value of the given floating point value: `v = fabs x`.
OpcodeFadd performs a floating point addition: / `v = Fadd x, y`.
OpcodeFcmp compares two floating point values: `v = fcmp Cond, x, y`.
OpcodeFcopysign copies the sign of the second floating point value to the first floating point value: `v = Fcopysign x, y`.
OpcodeFcvtFromSint converts a signed integer to a floating point value: `v = FcvtFromSint x`.
OpcodeFcvtFromUint converts an unsigned integer to a floating point value: `v = FcvtFromUint x`.
OpcodeFcvtToSint converts a floating point value to a signed integer: `v = FcvtToSint x`.
OpcodeFcvtToSintSat converts a floating point value to a signed integer: `v = FcvtToSintSat x` which saturates on overflow.
OpcodeFcvtToUint converts a floating point value to an unsigned integer: `v = FcvtToUint x`.
OpcodeFcvtToUintSat converts a floating point value to an unsigned integer: `v = FcvtToUintSat x` which saturates on overflow.
OpcodeFdemote demotes the given float point value: `v = Fdemote x`.
OpcodeFdiv performs a floating point division: `v = Fdiv x, y`.
OpcodeFence is a memory fence operation.
OpcodeFloor takes the floor of the given floating point value: `v = floor x`.
OpcodeFmax takes the maximum of two floating point values: `v = fmax x, y`.
OpcodeFmin takes the minimum of two floating point values: `v = fmin x, y`.
OpcodeFmul performs a floating point multiplication: `v = Fmul x, y`.
OpcodeFneg negates the given floating point value: `v = Fneg x`.
OpcodeFpromote promotes the given floating point value: `v = Fpromote x`.
OpcodeFsub performs a floating point subtraction: `v = Fsub x, y`.
OpcodeFvdemote converts the two double-precision floating point lanes to two lower single-precision lanes of the result `v = Fvdemote.lane x`.
OpcodeFvpromoteLow converts the two lower single-precision floating point lanes to the two double-precision lanes of the result: `v = FvpromoteLow.lane x` on vector.
OpcodeIadd performs an integer addition: `v = Iadd x, y`.
OpcodeIcmp compares two integer values with the given condition: `v = icmp Cond, x, y`.
OpcodeIcmpImm compares an integer value with the immediate value on the given condition: `v = icmp_imm Cond, x, Y`.
OpcodeIconst represents the integer const.
OpcodeImul performs an integer multiplication: `v = Imul x, y`.
OpcodeInsertlane inserts a lane value into a vector: `v = InsertLane x, y, Idx`.
TODO: complete opcode comments.
OpcodeIreduce narrow the given integer: `v = Ireduce x`.
OpcodeIshl does logical shift left: `v = Ishl x, y`.
OpcodeIstore16 stores the 16-bit value to the [base + offset] address, zero-extended to 64 bits: `Istore16 v, base, offset`.
OpcodeIstore32 stores the 32-bit value to the [base + offset] address, zero-extended to 64 bits: `Istore16 v, base, offset`.
OpcodeIstore8 stores the 8-bit value to the [base + offset] address, sign-extended to 64 bits: `Istore8 v, base, offset`.
OpcodeIsub performs an integer subtraction: `v = Isub x, y`.
OpcodeJump takes the list of args to the `block` and unconditionally jumps to it.
OpcodeLoad loads a Type value from the [base + offset] address: `v = Load base, offset`.
OpcodeLoadSplat represents a load that replicates the loaded value to all lanes `v = LoadSplat.lane p, Offset`.
OpcodeNearest takes the nearest integer of the given floating point value: `v = nearest x`.
OpcodePopcnt counts the number of 1-bits: `v = popcnt x`.
OpcodeReturn returns from the function: `return rvalues`.
OpcodeRotl rotates the given integer value to the left: `v = Rotl x, y`.
OpcodeRotr rotates the given integer value to the right: `v = Rotr x, y`.
OpcodeSdiv performs the signed integer division `v = Sdiv x, y`.
OpcodeSelect chooses between two values based on a condition `c`: `v = Select c, x, y`.
OpcodeSExtend sign-extends the given integer: `v = SExtend x, from->to`.
OpcodeShuffle shuffles two vectors using the given 128-bit immediate: `v = shuffle imm, x, y`. For each byte in the immediate, a value i in [0, 15] selects the i-th byte in vector x; i in [16, 31] selects the (i-16)-th byte in vector y.
OpcodeSload16 loads the 16-bit value from the [base + offset] address, sign-extended to 64 bits: `v = Sload16 base, offset`.
OpcodeSload32 loads the 32-bit value from the [base + offset] address, sign-extended to 64 bits: `v = Sload32 base, offset`.
OpcodeSload8 loads the 8-bit value from the [base + offset] address, sign-extended to 64 bits: `v = Sload8 base, offset`.
OpcodeSnarrow converts two input vectors x, y into a smaller lane vector by narrowing each lane, signed `v = Snarrow.lane x, y`.
OpcodeSplat performs a vector splat operation: `v = Splat.lane x`.
OpcodeSqmulRoundSat performs a lane-wise saturating rounding multiplication in Q15 format: `v = SqmulRoundSat.lane x,y` on vector.
OpcodeSqrt takes the square root of the given floating point value: `v = sqrt x`.
OpcodeSrem computes the remainder of the signed integer division `v = Srem x, y`.
OpcodeSshr does arithmetic shift right: `v = Sshr x, y`.
OpcodeStore stores a Type value to the [base + offset] address: `Store v, base, offset`.
OpcodeSwidenHigh converts high half of the smaller lane vector to a larger lane vector, sign extended: `v = SwidenHigh.lane x`.
OpcodeSwidenLow converts low half of the smaller lane vector to a larger lane vector, sign extended: `v = SwidenLow.lane x`.
OpcodeSwizzle performs a vector swizzle operation: `v = Swizzle.lane x, y`.
OpcodeTrunc takes the truncation of the given floating point value: `v = trunc x`.
OpcodeUdiv performs the unsigned integer division `v = Udiv x, y`.
OpcodeUExtend zero-extends the given integer: `v = UExtend x, from->to`.
OpcodeUload16 loads the 16-bit value from the [base + offset] address, zero-extended to 64 bits: `v = Uload16 base, offset`.
OpcodeUload32 loads the 32-bit value from the [base + offset] address, zero-extended to 64 bits: `v = Uload32 base, offset`.
OpcodeUload8 loads the 8-bit value from the [base + offset] address, zero-extended to 64 bits: `v = Uload8 base, offset`.
OpcodeUnarrow converts two input vectors x, y into a smaller lane vector by narrowing each lane, unsigned `v = Unarrow.lane x, y`.
OpcodeUndefined is a placeholder for undefined opcode. This can be used for debugging to intentionally cause a crash at certain point.
OpcodeUrem computes the remainder of the unsigned integer division `v = Urem x, y`.
OpcodeUshr does logical shift right: `v = Ushr x, y`.
OpcodeUwidenHigh converts high half of the smaller lane vector to a larger lane vector, zero (unsigned) extended: `v = UwidenHigh.lane x`.
OpcodeUwidenLow converts low half of the smaller lane vector to a larger lane vector, zero (unsigned) extended: `v = UwidenLow.lane x`.
OpcodeVallTrue performs a lane-wise all true operation: `s = VallTrue.lane a`.
OpcodeVanyTrue performs a any true operation: `s = VanyTrue a`.
OpcodeVAvgRound performs an unsigned integer avg, truncating to zero: `v = VAvgRound.lane x, y` on vector.
OpcodeVband computes binary and between two 128bit vectors: `v = band x, y`.
OpcodeVbandnot computes binary and-not between two 128bit vectors: `v = bandnot x, y`.
OpcodeVbitselect uses the bits in the control mask c to select the corresponding bit from x when 1 and y when 0: `v = bitselect c, x, y`.
OpcodeVbnot negates a 128bit vector: `v = bnot x`.
OpcodeVbor computes binary or between two 128bit vectors: `v = bor x, y`.
OpcodeVbxor computes binary xor between two 128bit vectors: `v = bxor x, y`.
OpcodeVCeil takes the ceiling of the given floating point value: `v = ceil.lane x` on vector.
OpcodeVconst represents the 128bit vector const.
OpcodeVFabs takes the absolute value of a floating point value: `v = VFabs.lane x on vector.
OpcodeVFadd performs a floating point addition: `v = VFadd.lane x, y` on vector.
OpcodeVFcmp compares two float values with the given condition: `v = VFcmp.lane Cond, x, y` on float.
OpcodeVFcvtFromSint converts a floating point value from a signed integer: `v = VFcvtFromSint.lane x` on vector. x is always a 32-bit integer lane, and the result is either a 32-bit or 64-bit floating point-sized vector.
OpcodeVFcvtFromUint converts a floating point value from an unsigned integer: `v = FcvtFromUint.lane x` on vector. x is always a 32-bit integer lane, and the result is either a 32-bit or 64-bit floating point-sized vector.
OpcodeVFcvtToSintSat converts a floating point value to a signed integer: `v = VFcvtToSintSat.lane x` on vector.
OpcodeVFcvtToUintSat converts a floating point value to an unsigned integer: `v = FcvtToUintSat.lane x` on vector.
OpcodeVFdiv performs a floating point division: `v = VFdiv.lane x, y` on vector.
OpcodeVFloor takes the floor of the given floating point value: `v = floor.lane x` on vector.
OpcodeVFmax takes the maximum of two floating point values: `v = VFmax.lane x, y on vector.
OpcodeVFmin takes the minimum of two floating point values: `v = VFmin.lane x, y on vector.
OpcodeVFmul performs a floating point multiplication: `v = VFmul.lane x, y` on vector.
OpcodeVFneg negates the given floating point vector value: `v = VFneg x`.
OpcodeVFsub performs a floating point subtraction: `v = VFsub.lane x, y` on vector.
OpcodeVhighBits performs a lane-wise extract of the high bits: `v = VhighBits.lane a`.
OpcodeVIabs returns the absolute value for the given vector value: `v = VIabs.lane x`.
OpcodeVIadd performs an integer addition: `v = VIadd.lane x, y` on vector.
OpcodeVIcmp compares two integer values with the given condition: `v = vicmp Cond, x, y` on vector.
OpcodeVImax performs a signed integer max: `v = VImax.lane x, y` on vector.
OpcodeVImin performs a signed integer min: `v = VImin.lane x, y` on vector.
OpcodeVImul performs an integer multiplication: `v = VImul.lane x, y` on vector.
OpcodeVIneg negates the given integer vector value: `v = VIneg x`.
OpcodeVIpopcnt counts the number of 1-bits in the given vector: `v = VIpopcnt x`.
OpcodeVIshl shifts x left by (y mod lane-width): `v = VIshl.lane x, y` on vector.
OpcodeVIsub performs an integer subtraction: `v = VIsub.lane x, y` on vector.
OpcodeVMaxPseudo computes the lane-wise maximum value `v = VMaxPseudo.lane x, y` on vector defined as `x < y ? x : y`.
OpcodeVMinPseudo computes the lane-wise minimum value `v = VMinPseudo.lane x, y` on vector defined as `y < x ? x : y`.
OpcodeVNearest takes the nearest integer of the given floating point value: `v = nearest.lane x` on vector.
OpcodeVSaddSat performs a signed saturating vector addition: `v = VSaddSat.lane x, y` on vector.
OpcodeVSqrt takes the minimum of two floating point values: `v = VFmin.lane x, y` on vector.
OpcodeVSshr shifts x right by (y mod lane-width), signed: `v = VSshr.lane x, y` on vector.
OpcodeVSsubSat performs a signed saturating vector subtraction: `v = VSsubSat.lane x, y` on vector.
OpcodeVTrunc takes the truncation of the given floating point value: `v = trunc.lane x` on vector.
OpcodeVUaddSat performs an unsigned saturating vector addition: `v = VUaddSat.lane x, y` on vector.
OpcodeVUmax performs an unsigned integer max: `v = VUmax.lane x, y` on vector.
OpcodeVUmin performs an unsigned integer min: `v = VUmin.lane x, y` on vector.
OpcodeVUshr shifts x right by (y mod lane-width), unsigned: `v = VUshr.lane x, y` on vector.
OpcodeVUsubSat performs an unsigned saturating vector subtraction: `v = VUsubSat.lane x, y` on vector.
OpcodeVZeroExtLoad loads a scalar single/double precision floating point value from the [p + Offset] address, and zero-extend it to the V128 value: `v = VExtLoad p, Offset`.
OpcodeWideningPairwiseDotProductS is a lane-wise widening pairwise dot product with signed saturation: `v = WideningPairwiseDotProductS x, y` on vector. Currently, the only lane is i16, and the result is i32.
TypeF32 represents 32-bit floats in the IEEE 754.
TypeF64 represents 64-bit floats in the IEEE 754.
TypeI32 represents an integer type with 32 bits.
TypeI64 represents an integer type with 64 bits.
TypeV128 represents 128-bit SIMD vectors.
const ValueInvalid Value = 4294967295