v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-revec-reducer.cc File Reference
Include dependency graph for wasm-revec-reducer.cc:

Go to the source code of this file.

Classes

class  v8::internal::compiler::turboshaft::StoreLoadInfo< Op, typename >
 
struct  v8::internal::compiler::turboshaft::StoreInfoCompare
 

Namespaces

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

Macros

#define TRACE(...)
 
#define CASE(operation)
 
#define CANONICALIZE_SHUFFLE(n)
 
#define UNARY_CASE(op_128, not_used)
 
#define UNARY_SIGN_EXTENSION_CASE(op_low, not_used1, op_high)
 
#define BINOP_CASE(op_128, not_used)
 
#define BINOP_SIGN_EXTENSION_CASE(op_low, not_used1, op_high)
 
#define SHIFT_CASE(op_128, not_used)
 
#define TERNARY_CASE(op_128, not_used)
 
#define CASE(op_128)
 

Typedefs

using v8::internal::compiler::turboshaft::StoreInfoSet = ZoneSet<StoreLoadInfo<StoreOp>, StoreInfoCompare>
 

Functions

bool v8::internal::compiler::turboshaft::IsSameOpAndKind (const Operation &op0, const Operation &op1)
 
std::string v8::internal::compiler::turboshaft::GetSimdOpcodeName (Operation const &op)
 
template<class Op , class Info >
bool v8::internal::compiler::turboshaft::LoadStrideEqualTo (const Graph &graph, const NodeGroup &node_group, int stride)
 
template<typename T >
bool v8::internal::compiler::turboshaft::IsSplat (const T &node_group)
 
template<typename FunctionType >
void v8::internal::compiler::turboshaft::ForEach (FunctionType callback, const ZoneUnorderedMap< OpIndex, PackNode * > &node_map)
 
template<typename FunctionType >
void v8::internal::compiler::turboshaft::ForEach (FunctionType callback, const ZoneUnorderedMap< OpIndex, ZoneVector< PackNode * > > &node_map)
 
bool v8::internal::compiler::turboshaft::IsSignExtensionOp (Operation &op)
 
bool v8::internal::compiler::turboshaft::IsLoadExtend (const Simd128LoadTransformOp &op)
 
bool v8::internal::compiler::turboshaft::IsLoadSplat (const Simd128LoadTransformOp &op)
 

Macro Definition Documentation

◆ BINOP_CASE

#define BINOP_CASE ( op_128,
not_used )
Value:
case Simd128BinopOp::Kind::k##op_128:

◆ BINOP_SIGN_EXTENSION_CASE

#define BINOP_SIGN_EXTENSION_CASE ( op_low,
not_used1,
op_high )
Value:
case Simd128BinopOp::Kind::k##op_low: { \
if (const Simd128BinopOp* binop1 = \
op1.TryCast<Opmask::kSimd128##op_high>(); \
binop1 && op0.Cast<Simd128BinopOp>().left() == binop1->left() && \
op0.Cast<Simd128BinopOp>().right() == binop1->right()) { \
return NewPackNode(node_group); \
} \
[[fallthrough]]; \
} \
case Simd128BinopOp::Kind::k##op_high: { \
if (op1.Cast<Simd128BinopOp>().kind == op0.Cast<Simd128BinopOp>().kind) { \
auto force_pack_type = \
node0 == node1 ? ForcePackNode::kSplat : ForcePackNode::kGeneral; \
return NewForcePackNode(node_group, force_pack_type, graph_); \
} else { \
return nullptr; \
} \
}
TFGraph * graph_

◆ CANONICALIZE_SHUFFLE

#define CANONICALIZE_SHUFFLE ( n)
Value:
wasm::SimdShuffle::CanonicalizeShuffle(false, shuffle_copy##n, &need_swap, \
&is_swizzle); \
if (is_swizzle) { \
/* Here shuffle couldn't be swizzle*/ \
return nullptr; \
} \
V<Simd128> shuffle##n##_left_idx = need_swap ? op##n.right() : op##n.left(); \
V<Simd128> shuffle##n##_right_idx = need_swap ? op##n.left() : op##n.right();
#define V(Name)

◆ CASE [1/2]

#define CASE ( op_128)
Value:
case Simd128BinopOp::Kind::k##op_128:

◆ CASE [2/2]

#define CASE ( operation)
Value:
case Opcode::k##operation: { \
using Op = operation##Op; \
return op0.Cast<Op>().kind == op1.Cast<Op>().kind; \
}
Builtins::Kind kind
Definition builtins.cc:40

◆ SHIFT_CASE

#define SHIFT_CASE ( op_128,
not_used )
Value:
case Simd128ShiftOp::Kind::k##op_128:

◆ TERNARY_CASE

#define TERNARY_CASE ( op_128,
not_used )
Value:
case Simd128TernaryOp::Kind::k##op_128:

◆ TRACE

#define TRACE ( ...)
Value:
do { \
if (v8_flags.trace_wasm_revectorize) { \
PrintF("Revec: %s %d: ", __func__, __LINE__); \
PrintF(__VA_ARGS__); \
} \
} while (false)

Definition at line 13 of file wasm-revec-reducer.cc.

◆ UNARY_CASE

#define UNARY_CASE ( op_128,
not_used )
Value:
case Simd128UnaryOp::Kind::k##op_128:

◆ UNARY_SIGN_EXTENSION_CASE

#define UNARY_SIGN_EXTENSION_CASE ( op_low,
not_used1,
op_high )
Value:
case Simd128UnaryOp::Kind::k##op_low: { \
if (const Simd128UnaryOp* unop1 = \
op1.TryCast<Opmask::kSimd128##op_high>(); \
unop1 && op0.Cast<Simd128UnaryOp>().input() == unop1->input()) { \
return NewPackNode(node_group); \
} \
[[fallthrough]]; \
} \
case Simd128UnaryOp::Kind::k##op_high: { \
if (op1.Cast<Simd128UnaryOp>().kind == op0.Cast<Simd128UnaryOp>().kind) { \
auto force_pack_type = \
node0 == node1 ? ForcePackNode::kSplat : ForcePackNode::kGeneral; \
return NewForcePackNode(node_group, force_pack_type, graph_); \
} else { \
return nullptr; \
} \
}