v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-revec-reducer.h File Reference
Include dependency graph for wasm-revec-reducer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  v8::internal::compiler::turboshaft::NodeGroup
 
class  v8::internal::compiler::turboshaft::PackNode
 
class  v8::internal::compiler::turboshaft::ForcePackNode
 
class  v8::internal::compiler::turboshaft::ShufflePackNode
 
class  v8::internal::compiler::turboshaft::ShufflePackNode::SpecificInfo
 
union  v8::internal::compiler::turboshaft::ShufflePackNode::SpecificInfo::Param
 
class  v8::internal::compiler::turboshaft::BundlePackNode
 
class  v8::internal::compiler::turboshaft::SLPTree
 
struct  v8::internal::compiler::turboshaft::SLPTree::ExtendIntToF32x4Info
 
struct  v8::internal::compiler::turboshaft::SLPTree::LaneExtendInfo
 
class  v8::internal::compiler::turboshaft::WasmRevecAnalyzer
 
class  v8::internal::compiler::turboshaft::WasmRevecReducer< Next >
 

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::compiler
 
namespace  v8::internal::compiler::turboshaft
 

Macros

#define SIMD256_LOADTRANSFORM_OP(V)
 
#define SIMD256_UNARY_SIMPLE_OP(V)
 
#define SIMD256_UNARY_SIGN_EXTENSION_OP(V)
 
#define SIMD256_BINOP_SIMPLE_OP(V)
 
#define SIMD256_BINOP_SIGN_EXTENSION_OP(V)
 
#define SIMD256_SHIFT_OP(V)
 
#define SIMD256_TERNARY_OP(V)
 
#define SIMD256_SPLAT_OP(V)
 
#define REDUCE_SEED_KIND(V)
 
#define V8_COMPILER_TURBOSHAFT_ASSEMBLER_MACROS_DEFINED   1
 
#define TSA_DCHECK(assembler, condition)
 
#define TSA_SLOW_DCHECK(assembler, ...)
 
#define LIKELY(...)
 
#define UNLIKELY(...)
 
#define BIND(label, ...)
 
#define BIND_LOOP(loop_label, ...)
 
#define WHILE(...)
 
#define FOREACH_IMPL_2(arg, iterable)
 
#define FOREACH_IMPL_3(arg0, arg1, iterable)
 
#define FOREACH(...)
 
#define BREAK   Asm().ControlFlowHelper_Goto(loop_exit_xx, {})
 
#define CONTINUE   Asm().ControlFlowHelper_Goto(loop_header_xx, {})
 
#define GOTO(label, ...)
 
#define GOTO_IF(cond, label, ...)
 
#define GOTO_IF_NOT(cond, label, ...)
 
#define FORCE_UNROLL_LOOP
 
#define SUPPRESSED_DANGLING_ELSE_WARNING_IF(...)
 
#define SUPPRESSED_DANGLING_ELSE_WARNING_ELSE   else
 
#define NO_SHADOW
 
#define RE_SHADOW   _Pragma("GCC diagnostic pop")
 
#define IF(...)
 
#define IF_NOT(...)
 
#define ELSE
 
#define Assert(condition)
 
#define REDUCE(operation)
 
#define REDUCE_INPUT_GRAPH(operation)
 
#define __   Asm().
 
#define UNOP_KIND_MAPPING(from, to)
 
#define SIGN_EXTENSION_UNOP_KIND_MAPPING(from_1, to, from_2)
 
#define BINOP_KIND_MAPPING(from, to)
 
#define SIGN_EXTENSION_BINOP_KIND_MAPPING(from_1, to, from_2)
 
#define SHIFT_KIND_MAPPING(from, to)
 
#define TERNARY_KIND_MAPPING(from, to)
 
#define TRANSFORM_KIND_MAPPING(from, to)
 
#define SPLAT_KIND_MAPPING(from, to)
 

Macro Definition Documentation

◆ __

#define __   Asm().

◆ Assert

#define Assert ( condition)
Value:
AssertImpl(condition, #condition, __FILE__, __LINE__)

◆ BIND

#define BIND ( label,
... )
Value:
auto [CONCAT(is_bound_, __LINE__), ##__VA_ARGS__] = \
Asm().ControlFlowHelper_Bind(label); \
CONCAT(is_bound_, __LINE__)))
Label label
#define CONCAT(a,...)
Definition macros.h:22

◆ BIND_LOOP

#define BIND_LOOP ( loop_label,
... )
Value:
for(auto [CONCAT(run_loop_, __LINE__), ##__VA_ARGS__] = \
Asm().ControlFlowHelper_BindLoop(loop_label); CONCAT(run_loop_, __LINE__); \
Asm().ControlFlowHelper_EndLoop(loop_label), \
CONCAT(run_loop_, __LINE__) = false)

◆ BINOP_KIND_MAPPING

#define BINOP_KIND_MAPPING ( from,
to )
Value:
case Simd128BinopOp::Kind::k##from: \
return Simd256BinopOp::Kind::k##to;
Point from
Point to

◆ BREAK

#define BREAK   Asm().ControlFlowHelper_Goto(loop_exit_xx, {})

◆ CONTINUE

#define CONTINUE   Asm().ControlFlowHelper_Goto(loop_header_xx, {})

◆ ELSE

#define ELSE
Value:
iteration == 1 && (bound = Asm().ControlFlowHelper_BindElse(&state)))
#define SUPPRESSED_DANGLING_ELSE_WARNING_ELSE

◆ FORCE_UNROLL_LOOP

#define FORCE_UNROLL_LOOP

◆ FOREACH

#define FOREACH ( ...)
Value:
CONCAT(FOREACH_IMPL_, COUNT_MACRO_ARGS(__VA_ARGS__))(__VA_ARGS__)
#define COUNT_MACRO_ARGS(...)
Definition macros.h:28

◆ FOREACH_IMPL_2

#define FOREACH_IMPL_2 ( arg,
iterable )
Value:
for (auto [CONCAT(run_loop_, __LINE__), iterable_xx, loop_header_yy, \
loop_exit_xx, current_iterator_xx, arg] = \
Asm().ControlFlowHelper_Foreach(iterable); \
CONCAT(run_loop_, __LINE__); \
Asm().ControlFlowHelper_EndForeachLoop( \
std::move(iterable_xx), loop_header_yy, loop_exit_xx, \
current_iterator_xx), \
CONCAT(run_loop_, __LINE__) = false)

◆ FOREACH_IMPL_3

#define FOREACH_IMPL_3 ( arg0,
arg1,
iterable )
Value:
for (auto [CONCAT(run_loop_, __LINE__), iterable_xx, loop_header_yy, \
loop_exit_xx, current_iterator_xx, arg0, arg1] = \
Asm().ControlFlowHelper_Foreach(iterable); \
CONCAT(run_loop_, __LINE__); \
Asm().ControlFlowHelper_EndForeachLoop( \
std::move(iterable_xx), loop_header_yy, loop_exit_xx, \
current_iterator_xx), \
CONCAT(run_loop_, __LINE__) = false)

◆ GOTO

#define GOTO ( label,
... )
Value:
Asm().ControlFlowHelper_Goto(label, {__VA_ARGS__})

◆ GOTO_IF

#define GOTO_IF ( cond,
label,
... )
Value:
Asm().ControlFlowHelper_GotoIf(cond, label, {__VA_ARGS__})

◆ GOTO_IF_NOT

#define GOTO_IF_NOT ( cond,
label,
... )
Value:
Asm().ControlFlowHelper_GotoIfNot(cond, label, {__VA_ARGS__})

◆ IF

#define IF ( ...)
Value:
NO_SHADOW \
SUPPRESSED_DANGLING_ELSE_WARNING_IF( \
typename std::decay_t<decltype(Asm())>::ControlFlowHelper_IfState state; \
true) \
for (int iteration = 0, bound = false; iteration < 3; \
(bound ? Asm().ControlFlowHelper_FinishIfBlock(&state) : (void)0), \
bound = false, iteration++) \
RE_SHADOW \
SUPPRESSED_DANGLING_ELSE_WARNING_IF(iteration == 2) { \
Asm().ControlFlowHelper_EndIf(&state); \
} \
iteration == 0 && \
(bound = Asm().ControlFlowHelper_BindIf(__VA_ARGS__, &state)))
#define FORCE_UNROLL_LOOP

◆ IF_NOT

#define IF_NOT ( ...)
Value:
NO_SHADOW \
SUPPRESSED_DANGLING_ELSE_WARNING_IF( \
typename std::decay_t<decltype(Asm())>::ControlFlowHelper_IfState state; \
true) \
for (int iteration = 0, bound = false; iteration < 3; \
(bound ? Asm().ControlFlowHelper_FinishIfBlock(&state) : (void)0), \
bound = false, iteration++) \
RE_SHADOW \
SUPPRESSED_DANGLING_ELSE_WARNING_IF(iteration == 2) { \
Asm().ControlFlowHelper_EndIf(&state); \
} \
iteration == 0 && \
(bound = Asm().ControlFlowHelper_BindIfNot(__VA_ARGS__, &state)))

◆ LIKELY

#define LIKELY ( ...)
Value:
ConditionWithHint(__VA_ARGS__, BranchHint::kTrue)

◆ NO_SHADOW

#define NO_SHADOW
Value:
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wshadow\"")

◆ RE_SHADOW

#define RE_SHADOW   _Pragma("GCC diagnostic pop")

◆ REDUCE

#define REDUCE ( operation)
Value:
Reduce##operation

◆ REDUCE_INPUT_GRAPH

#define REDUCE_INPUT_GRAPH ( operation)
Value:
ReduceInputGraph##operation

◆ REDUCE_SEED_KIND

#define REDUCE_SEED_KIND ( V)
Value:
V(I64x2Add) \
V(I32x4Add) \
V(I8x16Add) \
V(I16x8AddSatS) \
V(I16x8AddSatU) \
V(I8x16AddSatS) \
V(I8x16AddSatU) \
V(I16x8SConvertI32x4) \
V(I16x8UConvertI32x4) \
V(I8x16SConvertI16x8) \
V(I8x16UConvertI16x8)
#define V(Name)

Definition at line 201 of file wasm-revec-reducer.h.

◆ SHIFT_KIND_MAPPING

#define SHIFT_KIND_MAPPING ( from,
to )
Value:
case Simd128ShiftOp::Kind::k##from: \
return Simd256ShiftOp::Kind::k##to;

◆ SIGN_EXTENSION_BINOP_KIND_MAPPING

#define SIGN_EXTENSION_BINOP_KIND_MAPPING ( from_1,
to,
from_2 )
Value:
case Simd128BinopOp::Kind::k##from_1: \
return Simd256BinopOp::Kind::k##to; \
case Simd128BinopOp::Kind::k##from_2: \
return Simd256BinopOp::Kind::k##to;

◆ SIGN_EXTENSION_UNOP_KIND_MAPPING

#define SIGN_EXTENSION_UNOP_KIND_MAPPING ( from_1,
to,
from_2 )
Value:
case Simd128UnaryOp::Kind::k##from_1: \
return Simd256UnaryOp::Kind::k##to; \
case Simd128UnaryOp::Kind::k##from_2: \
return Simd256UnaryOp::Kind::k##to;

◆ SIMD256_BINOP_SIGN_EXTENSION_OP

#define SIMD256_BINOP_SIGN_EXTENSION_OP ( V)
Value:
V(I16x8ExtMulLowI8x16S, I16x16ExtMulI8x16S, I16x8ExtMulHighI8x16S) \
V(I16x8ExtMulLowI8x16U, I16x16ExtMulI8x16U, I16x8ExtMulHighI8x16U) \
V(I32x4ExtMulLowI16x8S, I32x8ExtMulI16x8S, I32x4ExtMulHighI16x8S) \
V(I32x4ExtMulLowI16x8U, I32x8ExtMulI16x8U, I32x4ExtMulHighI16x8U) \
V(I64x2ExtMulLowI32x4S, I64x4ExtMulI32x4S, I64x2ExtMulHighI32x4S) \
V(I64x2ExtMulLowI32x4U, I64x4ExtMulI32x4U, I64x2ExtMulHighI32x4U)

Definition at line 163 of file wasm-revec-reducer.h.

◆ SIMD256_BINOP_SIMPLE_OP

#define SIMD256_BINOP_SIMPLE_OP ( V)

Definition at line 68 of file wasm-revec-reducer.h.

◆ SIMD256_LOADTRANSFORM_OP

#define SIMD256_LOADTRANSFORM_OP ( V)
Value:
V(8x8S, 8x16S) \
V(8x8U, 8x16U) \
V(16x4S, 16x8S) \
V(16x4U, 16x8U) \
V(32x2S, 32x4S) \
V(32x2U, 32x4U) \
V(8Splat, 8Splat) \
V(16Splat, 16Splat) \
V(32Splat, 32Splat) \
V(64Splat, 64Splat)

Definition at line 23 of file wasm-revec-reducer.h.

◆ SIMD256_SHIFT_OP

#define SIMD256_SHIFT_OP ( V)
Value:
V(I16x8Shl, I16x16Shl) \
V(I16x8ShrS, I16x16ShrS) \
V(I16x8ShrU, I16x16ShrU) \
V(I32x4Shl, I32x8Shl) \
V(I32x4ShrS, I32x8ShrS) \
V(I32x4ShrU, I32x8ShrU) \
V(I64x2Shl, I64x4Shl) \
V(I64x2ShrU, I64x4ShrU)

Definition at line 171 of file wasm-revec-reducer.h.

◆ SIMD256_SPLAT_OP

#define SIMD256_SPLAT_OP ( V)
Value:
V(I8x16, I8x32) \
V(I16x8, I16x16) \
V(I32x4, I32x8) \
V(I64x2, I64x4) \
V(F32x4, F32x8) \
V(F64x2, F64x4)

Definition at line 193 of file wasm-revec-reducer.h.

◆ SIMD256_TERNARY_OP

#define SIMD256_TERNARY_OP ( V)
Value:
V(S128Select, S256Select) \
V(F32x4Qfma, F32x8Qfma) \
V(F32x4Qfms, F32x8Qfms) \
V(F64x2Qfma, F64x4Qfma) \
V(F64x2Qfms, F64x4Qfms) \
V(I8x16RelaxedLaneSelect, I8x32RelaxedLaneSelect) \
V(I16x8RelaxedLaneSelect, I16x16RelaxedLaneSelect) \
V(I32x4RelaxedLaneSelect, I32x8RelaxedLaneSelect) \
V(I64x2RelaxedLaneSelect, I64x4RelaxedLaneSelect) \
V(I32x4DotI8x16I7x16AddS, I32x8DotI8x32I7x32AddS)

Definition at line 181 of file wasm-revec-reducer.h.

◆ SIMD256_UNARY_SIGN_EXTENSION_OP

#define SIMD256_UNARY_SIGN_EXTENSION_OP ( V)
Value:
V(I64x2SConvertI32x4Low, I64x4SConvertI32x4, I64x2SConvertI32x4High) \
V(I64x2UConvertI32x4Low, I64x4UConvertI32x4, I64x2UConvertI32x4High) \
V(I32x4SConvertI16x8Low, I32x8SConvertI16x8, I32x4SConvertI16x8High) \
V(I32x4UConvertI16x8Low, I32x8UConvertI16x8, I32x4UConvertI16x8High) \
V(I16x8SConvertI8x16Low, I16x16SConvertI8x16, I16x8SConvertI8x16High) \
V(I16x8UConvertI8x16Low, I16x16UConvertI8x16, I16x8UConvertI8x16High)

Definition at line 60 of file wasm-revec-reducer.h.

◆ SIMD256_UNARY_SIMPLE_OP

#define SIMD256_UNARY_SIMPLE_OP ( V)
Value:
V(S128Not, S256Not) \
V(I8x16Abs, I8x32Abs) \
V(I8x16Neg, I8x32Neg) \
V(I16x8ExtAddPairwiseI8x16S, I16x16ExtAddPairwiseI8x32S) \
V(I16x8ExtAddPairwiseI8x16U, I16x16ExtAddPairwiseI8x32U) \
V(I32x4ExtAddPairwiseI16x8S, I32x8ExtAddPairwiseI16x16S) \
V(I32x4ExtAddPairwiseI16x8U, I32x8ExtAddPairwiseI16x16U) \
V(I16x8Abs, I16x16Abs) \
V(I16x8Neg, I16x16Neg) \
V(I32x4Abs, I32x8Abs) \
V(I32x4Neg, I32x8Neg) \
V(F32x4Abs, F32x8Abs) \
V(F32x4Neg, F32x8Neg) \
V(F32x4Sqrt, F32x8Sqrt) \
V(F64x2Abs, F64x4Abs) \
V(F64x2Neg, F64x4Neg) \
V(F64x2Sqrt, F64x4Sqrt) \
V(I32x4UConvertF32x4, I32x8UConvertF32x8) \
V(I32x4SConvertF32x4, I32x8SConvertF32x8) \
V(F32x4UConvertI32x4, F32x8UConvertI32x8) \
V(F32x4SConvertI32x4, F32x8SConvertI32x8) \
V(I32x4RelaxedTruncF32x4S, I32x8RelaxedTruncF32x8S) \
V(I32x4RelaxedTruncF32x4U, I32x8RelaxedTruncF32x8U)

Definition at line 35 of file wasm-revec-reducer.h.

◆ SPLAT_KIND_MAPPING

#define SPLAT_KIND_MAPPING ( from,
to )
Value:
case Simd128SplatOp::Kind::k##from: \
return Simd256SplatOp::Kind::k##to;

◆ SUPPRESSED_DANGLING_ELSE_WARNING_ELSE

#define SUPPRESSED_DANGLING_ELSE_WARNING_ELSE   else

◆ SUPPRESSED_DANGLING_ELSE_WARNING_IF

#define SUPPRESSED_DANGLING_ELSE_WARNING_IF ( ...)
Value:
if (__VA_ARGS__)

◆ TERNARY_KIND_MAPPING

#define TERNARY_KIND_MAPPING ( from,
to )
Value:
case Simd128TernaryOp::Kind::k##from: \
return Simd256TernaryOp::Kind::k##to;

◆ TRANSFORM_KIND_MAPPING

#define TRANSFORM_KIND_MAPPING ( from,
to )
Value:
case Simd128LoadTransformOp::TransformKind::k##from: \
return Simd256LoadTransformOp::TransformKind::k##to;

◆ TSA_DCHECK

#define TSA_DCHECK ( assembler,
condition )
Value:
(assembler)->Asm().Dcheck(condition, #condition, __FILE__, __LINE__ )
AssemblerT assembler

◆ TSA_SLOW_DCHECK

#define TSA_SLOW_DCHECK ( assembler,
... )
Value:
((void)0)

◆ UNLIKELY

#define UNLIKELY ( ...)
Value:
ConditionWithHint(__VA_ARGS__, BranchHint::kFalse)

◆ UNOP_KIND_MAPPING

#define UNOP_KIND_MAPPING ( from,
to )
Value:
case Simd128UnaryOp::Kind::k##from: \
return Simd256UnaryOp::Kind::k##to;

◆ V8_COMPILER_TURBOSHAFT_ASSEMBLER_MACROS_DEFINED

#define V8_COMPILER_TURBOSHAFT_ASSEMBLER_MACROS_DEFINED   1

◆ WHILE

#define WHILE ( ...)
Value:
for (auto [CONCAT(run_loop_, __LINE__), loop_header_xx, loop_exit_xx] \
= Asm().ControlFlowHelper_While([&]() { \
return Asm().resolve(ConstOrV<Word32>(__VA_ARGS__)); \
}); \
CONCAT(run_loop_, __LINE__); \
Asm().ControlFlowHelper_EndWhileLoop(loop_header_xx, loop_exit_xx), \
CONCAT(run_loop_, __LINE__) = false)