v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::compiler::turboshaft::OperationMatcher Class Reference

#include <operation-matcher.h>

Inheritance diagram for v8::internal::compiler::turboshaft::OperationMatcher:
Collaboration diagram for v8::internal::compiler::turboshaft::OperationMatcher:

Public Types

template<typename T >
using VMatch = detail::ValueMatch<T, const_or_v_exists_v<T>>
 
template<typename T >
using OMatch = detail::OptionMatch<T>
 

Public Member Functions

 OperationMatcher (const Graph &graph)
 
template<class Op >
bool Is (V< AnyOrNone > op_idx) const
 
template<class Op >
const underlying_operation_t< Op > * TryCast (V< AnyOrNone > op_idx) const
 
template<class Op >
const underlying_operation_t< Op > & Cast (V< AnyOrNone > op_idx) const
 
const OperationGet (V< AnyOrNone > op_idx) const
 
V< AnyOrNoneIndex (const Operation &op) const
 
bool MatchZero (V< Any > matched) const
 
bool MatchIntegralZero (V< Any > matched) const
 
bool MatchSmiZero (V< Any > matched) const
 
bool MatchFloat32Constant (V< Any > matched, float *constant) const
 
bool MatchFloat32Constant (V< Any > matched, i::Float32 *constant) const
 
bool MatchFloat64Constant (V< Any > matched, double *constant) const
 
bool MatchFloat64Constant (V< Any > matched, i::Float64 *constant) const
 
bool MatchFloat (V< Any > matched, double *value) const
 
bool MatchFloat (V< Any > matched, double value) const
 
bool MatchNaN (V< Float > matched) const
 
bool MatchHeapConstant (V< Any > matched, Handle< HeapObject > *tagged=nullptr) const
 
bool MatchIntegralWordConstant (V< Any > matched, WordRepresentation rep, uint64_t *unsigned_constant, int64_t *signed_constant=nullptr) const
 
bool MatchIntegralWordConstant (V< Any > matched, WordRepresentation rep, int64_t *signed_constant) const
 
bool MatchIntegralWord32Constant (V< Any > matched, uint32_t *constant) const
 
bool MatchIntegralWord64Constant (V< Any > matched, uint64_t *constant) const
 
bool MatchIntegralWord32Constant (V< Any > matched, uint32_t constant) const
 
bool MatchIntegralWord64Constant (V< Any > matched, int64_t *constant) const
 
bool MatchIntegralWord32Constant (V< Any > matched, int32_t *constant) const
 
template<typename T = intptr_t>
bool MatchIntegralWordPtrConstant (V< Any > matched, T *constant) const
 
bool MatchSignedIntegralConstant (V< Any > matched, int64_t *constant) const
 
bool MatchUnsignedIntegralConstant (V< Any > matched, uint64_t *constant) const
 
bool MatchExternalConstant (V< Any > matched, ExternalReference *reference) const
 
bool MatchWasmStubCallConstant (V< Any > matched, uint64_t *stub_id) const
 
template<typename T >
bool MatchChange (V< Any > matched, VMatch< T > input, OMatch< ChangeOp::Kind > kind={}, OMatch< ChangeOp::Assumption > assumption={}, OMatch< RegisterRepresentation > from={}, OMatch< RegisterRepresentation > to={}) const
 
bool MatchTruncateWord64ToWord32 (V< Any > matched, VMatch< Word64 > input) const
 
template<typename T >
requires (IsWord<T>())
bool MatchWordBinop (V< Any > matched, VMatch< T > left, VMatch< T > right, OMatch< WordBinopOp::Kind > kind={}, OMatch< WordRepresentation > rep={}) const
 
template<class T >
requires (IsWord<T>())
bool MatchWordAdd (V< Any > matched, V< T > *left, V< T > *right, WordRepresentation rep) const
 
template<class T >
requires (IsWord<T>())
bool MatchWordSub (V< Any > matched, V< T > *left, V< T > *right, WordRepresentation rep) const
 
template<class T >
requires (IsWord<T>())
bool MatchWordMul (V< Any > matched, V< T > *left, V< T > *right, WordRepresentation rep) const
 
template<class T >
requires (IsWord<T>())
bool MatchBitwiseAnd (V< Any > matched, V< T > *left, V< T > *right, WordRepresentation rep) const
 
template<class T >
requires (IsWord<T>())
bool MatchBitwiseAndWithConstant (V< Any > matched, V< T > *value, uint64_t *constant, WordRepresentation rep) const
 
template<typename T >
bool MatchEqual (V< Any > matched, V< T > *left, V< T > *right) const
 
bool MatchFloatUnary (V< Any > matched, V< Float > *input, FloatUnaryOp::Kind kind, FloatRepresentation rep) const
 
bool MatchFloatRoundDown (V< Any > matched, V< Float > *input, FloatRepresentation rep) const
 
bool MatchFloatBinary (V< Any > matched, V< Float > *left, V< Float > *right, FloatBinopOp::Kind kind, FloatRepresentation rep) const
 
bool MatchFloatSub (V< Any > matched, V< Float > *left, V< Float > *right, FloatRepresentation rep) const
 
template<class T >
requires (IsWord<T>())
bool MatchConstantShift (V< Any > matched, V< T > *input, ShiftOp::Kind *kind, WordRepresentation *rep, int *amount) const
 
template<class T >
requires (IsWord<T>())
bool MatchConstantShift (V< Any > matched, V< T > *input, ShiftOp::Kind kind, WordRepresentation rep, int *amount) const
 
template<class T >
requires (IsWord<T>())
bool MatchConstantRightShift (V< Any > matched, V< T > *input, WordRepresentation rep, int *amount) const
 
template<class T >
requires (IsWord<T>())
bool MatchConstantLeftShift (V< Any > matched, V< T > *input, WordRepresentation rep, int *amount) const
 
template<class T >
requires (IsWord<T>())
bool MatchConstantShiftRightArithmeticShiftOutZeros (V< Any > matched, V< T > *input, WordRepresentation rep, uint16_t *amount) const
 
bool MatchPhi (V< Any > matched, std::optional< int > input_count=std::nullopt) const
 
bool MatchPowerOfTwoWordConstant (V< Any > matched, int64_t *ret_cst, WordRepresentation rep) const
 
bool MatchPowerOfTwoWord32Constant (V< Any > matched, int32_t *divisor) const
 

Private Attributes

const Graphgraph_
 

Detailed Description

Definition at line 85 of file operation-matcher.h.

Member Typedef Documentation

◆ OMatch

◆ VMatch

Constructor & Destructor Documentation

◆ OperationMatcher()

v8::internal::compiler::turboshaft::OperationMatcher::OperationMatcher ( const Graph & graph)
inlineexplicit

Definition at line 92 of file operation-matcher.h.

Member Function Documentation

◆ Cast()

template<class Op >
const underlying_operation_t< Op > & v8::internal::compiler::turboshaft::OperationMatcher::Cast ( V< AnyOrNone > op_idx) const
inline

Definition at line 105 of file operation-matcher.h.

Here is the caller graph for this function:

◆ Get()

const Operation & v8::internal::compiler::turboshaft::OperationMatcher::Get ( V< AnyOrNone > op_idx) const
inline

Definition at line 109 of file operation-matcher.h.

Here is the caller graph for this function:

◆ Index()

V< AnyOrNone > v8::internal::compiler::turboshaft::OperationMatcher::Index ( const Operation & op) const
inline

Definition at line 111 of file operation-matcher.h.

◆ Is()

template<class Op >
bool v8::internal::compiler::turboshaft::OperationMatcher::Is ( V< AnyOrNone > op_idx) const
inline

Definition at line 95 of file operation-matcher.h.

Here is the caller graph for this function:

◆ MatchBitwiseAnd()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchBitwiseAnd ( V< Any > matched,
V< T > * left,
V< T > * right,
WordRepresentation rep ) const
inline

Definition at line 418 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchBitwiseAndWithConstant()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchBitwiseAndWithConstant ( V< Any > matched,
V< T > * value,
uint64_t * constant,
WordRepresentation rep ) const
inline

Definition at line 426 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchChange()

template<typename T >
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchChange ( V< Any > matched,
VMatch< T > input,
OMatch< ChangeOp::Kind > kind = {},
OMatch< ChangeOp::Assumption > assumption = {},
OMatch< RegisterRepresentation > from = {},
OMatch< RegisterRepresentation > to = {} ) const
inline

Definition at line 348 of file operation-matcher.h.

Here is the caller graph for this function:

◆ MatchConstantLeftShift()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchConstantLeftShift ( V< Any > matched,
V< T > * input,
WordRepresentation rep,
int * amount ) const
inline

Definition at line 537 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchConstantRightShift()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchConstantRightShift ( V< Any > matched,
V< T > * input,
WordRepresentation rep,
int * amount ) const
inline

Definition at line 520 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchConstantShift() [1/2]

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchConstantShift ( V< Any > matched,
V< T > * input,
ShiftOp::Kind * kind,
WordRepresentation * rep,
int * amount ) const
inline

Definition at line 483 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchConstantShift() [2/2]

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchConstantShift ( V< Any > matched,
V< T > * input,
ShiftOp::Kind kind,
WordRepresentation rep,
int * amount ) const
inline

Definition at line 500 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchConstantShiftRightArithmeticShiftOutZeros()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchConstantShiftRightArithmeticShiftOutZeros ( V< Any > matched,
V< T > * input,
WordRepresentation rep,
uint16_t * amount ) const
inline

Definition at line 554 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchEqual()

template<typename T >
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchEqual ( V< Any > matched,
V< T > * left,
V< T > * right ) const
inline

Definition at line 442 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchExternalConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchExternalConstant ( V< Any > matched,
ExternalReference * reference ) const
inline

Definition at line 328 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchFloat() [1/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat ( V< Any > matched,
double * value ) const
inline

Definition at line 175 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchFloat() [2/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat ( V< Any > matched,
double value ) const
inline

Definition at line 188 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloat32Constant() [1/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat32Constant ( V< Any > matched,
float * constant ) const
inline

Definition at line 143 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloat32Constant() [2/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat32Constant ( V< Any > matched,
i::Float32 * constant ) const
inline

Definition at line 151 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloat64Constant() [1/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat64Constant ( V< Any > matched,
double * constant ) const
inline

Definition at line 159 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloat64Constant() [2/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloat64Constant ( V< Any > matched,
i::Float64 * constant ) const
inline

Definition at line 167 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloatBinary()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloatBinary ( V< Any > matched,
V< Float > * left,
V< Float > * right,
FloatBinopOp::Kind kind,
FloatRepresentation rep ) const
inline

Definition at line 465 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchFloatRoundDown()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloatRoundDown ( V< Any > matched,
V< Float > * input,
FloatRepresentation rep ) const
inline

Definition at line 460 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloatSub()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloatSub ( V< Any > matched,
V< Float > * left,
V< Float > * right,
FloatRepresentation rep ) const
inline

Definition at line 475 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchFloatUnary()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchFloatUnary ( V< Any > matched,
V< Float > * input,
FloatUnaryOp::Kind kind,
FloatRepresentation rep ) const
inline

Definition at line 452 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchHeapConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchHeapConstant ( V< Any > matched,
Handle< HeapObject > * tagged = nullptr ) const
inline

Definition at line 200 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchIntegralWord32Constant() [1/3]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWord32Constant ( V< Any > matched,
int32_t * constant ) const
inline

Definition at line 280 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchIntegralWord32Constant() [2/3]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWord32Constant ( V< Any > matched,
uint32_t * constant ) const
inline

Definition at line 253 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchIntegralWord32Constant() [3/3]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWord32Constant ( V< Any > matched,
uint32_t constant ) const
inline

Definition at line 267 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchIntegralWord64Constant() [1/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWord64Constant ( V< Any > matched,
int64_t * constant ) const
inline

Definition at line 275 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchIntegralWord64Constant() [2/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWord64Constant ( V< Any > matched,
uint64_t * constant ) const
inline

Definition at line 262 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchIntegralWordConstant() [1/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWordConstant ( V< Any > matched,
WordRepresentation rep,
int64_t * signed_constant ) const
inline

Definition at line 248 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchIntegralWordConstant() [2/2]

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWordConstant ( V< Any > matched,
WordRepresentation rep,
uint64_t * unsigned_constant,
int64_t * signed_constant = nullptr ) const
inline

Definition at line 214 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchIntegralWordPtrConstant()

template<typename T = intptr_t>
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralWordPtrConstant ( V< Any > matched,
T * constant ) const
inline

Definition at line 290 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchIntegralZero()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchIntegralZero ( V< Any > matched) const
inline

Definition at line 131 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchNaN()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchNaN ( V< Float > matched) const
inline

Definition at line 195 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchPhi()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchPhi ( V< Any > matched,
std::optional< int > input_count = std::nullopt ) const
inline

Definition at line 572 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchPowerOfTwoWord32Constant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchPowerOfTwoWord32Constant ( V< Any > matched,
int32_t * divisor ) const
inline

Definition at line 592 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchPowerOfTwoWordConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchPowerOfTwoWordConstant ( V< Any > matched,
int64_t * ret_cst,
WordRepresentation rep ) const
inline

Definition at line 580 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchSignedIntegralConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchSignedIntegralConstant ( V< Any > matched,
int64_t * constant ) const
inline

Definition at line 306 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchSmiZero()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchSmiZero ( V< Any > matched) const
inline

Definition at line 136 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchTruncateWord64ToWord32()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchTruncateWord64ToWord32 ( V< Any > matched,
VMatch< Word64 > input ) const
inline

Definition at line 368 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchUnsignedIntegralConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchUnsignedIntegralConstant ( V< Any > matched,
uint64_t * constant ) const
inline

Definition at line 317 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchWasmStubCallConstant()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchWasmStubCallConstant ( V< Any > matched,
uint64_t * stub_id ) const
inline

Definition at line 337 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchWordAdd()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchWordAdd ( V< Any > matched,
V< T > * left,
V< T > * right,
WordRepresentation rep ) const
inline

Definition at line 394 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchWordBinop()

template<typename T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchWordBinop ( V< Any > matched,
VMatch< T > left,
VMatch< T > right,
OMatch< WordBinopOp::Kind > kind = {},
OMatch< WordRepresentation > rep = {} ) const
inline

Definition at line 376 of file operation-matcher.h.

Here is the caller graph for this function:

◆ MatchWordMul()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchWordMul ( V< Any > matched,
V< T > * left,
V< T > * right,
WordRepresentation rep ) const
inline

Definition at line 410 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchWordSub()

template<class T >
requires (IsWord<T>())
bool v8::internal::compiler::turboshaft::OperationMatcher::MatchWordSub ( V< Any > matched,
V< T > * left,
V< T > * right,
WordRepresentation rep ) const
inline

Definition at line 402 of file operation-matcher.h.

Here is the call graph for this function:

◆ MatchZero()

bool v8::internal::compiler::turboshaft::OperationMatcher::MatchZero ( V< Any > matched) const
inline

Definition at line 113 of file operation-matcher.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryCast()

template<class Op >
const underlying_operation_t< Op > * v8::internal::compiler::turboshaft::OperationMatcher::TryCast ( V< AnyOrNone > op_idx) const
inline

Definition at line 100 of file operation-matcher.h.

Here is the caller graph for this function:

Member Data Documentation

◆ graph_

const Graph& v8::internal::compiler::turboshaft::OperationMatcher::graph_
private

Definition at line 604 of file operation-matcher.h.


The documentation for this class was generated from the following file: