# Functions
NewBuilder returns a new Builder implementation.
# Constants
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`.
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.
OpcodeCallIndirect calls a function specified by `callee` which is a function address: `returnvals = call_indirect SIG, callee, args`.
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`.
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.
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.
OpcodeVFcvtFromUint converts a floating point value from an unsigned integer: `v = FcvtFromUint.lane x` on 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.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ValuesNil is a nil Values.
# Structs
Instruction represents an instruction whose opcode is specified by Opcode.
Signature is a function prototype.
ValueInfo contains the data per Value used to lower the SSA in backend.
# Interfaces
BasicBlock represents the Basic Block of an SSA function.
Builder is used to builds SSA consisting of Basic Blocks per function.
# Type aliases
AtomicRmwOp represents the atomic read-modify-write operation.
No description provided by the author
No description provided by the author
FuncRef is a unique identifier for a function of the frontend, and is used to reference the function in function call.
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.
IntegerCmpCond represents a condition for integer comparison.
Opcode represents a SSA instruction.
SignatureID is an unique identifier used to lookup.
SourceOffset represents the offset of the source of an instruction.
No description provided by the author
Value represents an SSA value with a type information.
ValueID is the lower 32bit of Value, which is the pure identifier of Value without type info.
Variable is a unique identifier for a source program's variable and will correspond to multiple ssa Value(s).
VecLane represents a lane in a SIMD vector.