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

#include <machine-optimization-reducer.h>

Inheritance diagram for v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >:
Collaboration diagram for v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >:

Public Member Functions

V< Untagged > REDUCE Change (V< Untagged > input, ChangeOp::Kind kind, ChangeOp::Assumption assumption, RegisterRepresentation from, RegisterRepresentation to)
 
V< Float64 > REDUCE BitcastWord32PairToFloat64 (V< Word32 > hi_word32, V< Word32 > lo_word32)
 
V< Any > REDUCE TaggedBitcast (V< Any > input, RegisterRepresentation from, RegisterRepresentation to, TaggedBitcastOp::Kind kind)
 
V< Float > REDUCE FloatUnary (V< Float > input, FloatUnaryOp::Kind kind, FloatRepresentation rep)
 
V< Word > REDUCE WordUnary (V< Word > input, WordUnaryOp::Kind kind, WordRepresentation rep)
 
V< Float > REDUCE FloatBinop (V< Float > lhs, V< Float > rhs, FloatBinopOp::Kind kind, FloatRepresentation rep)
 
V< Word > REDUCE WordBinop (V< Word > left, V< Word > right, WordBinopOp::Kind kind, WordRepresentation rep)
 
bool TryMatchHeapObject (V< Any > idx, int depth=0)
 
std::optional< V< Word > > TryReduceToRor (V< Word > left, V< Word > right, WordBinopOp::Kind kind, WordRepresentation rep)
 
V< Tuple< Word, Word32 > > REDUCE OverflowCheckedBinop (V< Word > left, V< Word > right, OverflowCheckedBinopOp::Kind kind, WordRepresentation rep)
 
V< Word32 > REDUCE Comparison (V< Any > left, V< Any > right, ComparisonOp::Kind kind, RegisterRepresentation rep)
 
V< Word > REDUCE Shift (V< Word > left, V< Word32 > right, ShiftOp::Kind kind, WordRepresentation rep)
 
V< None > REDUCE Branch (OpIndex condition, Block *if_true, Block *if_false, BranchHint hint)
 
V< None > REDUCE DeoptimizeIf (V< Word32 > condition, V< FrameState > frame_state, bool negated, const DeoptimizeParameters *parameters)
 
V< Any > REDUCE Select (V< Word32 > cond, V< Any > vtrue, V< Any > vfalse, RegisterRepresentation rep, BranchHint hint, SelectOp::Implementation implem)
 
V< None > REDUCE StaticAssert (V< Word32 > condition, const char *source)
 
V< None > REDUCE Switch (V< Word32 > input, base::Vector< SwitchOp::Case > cases, Block *default_case, BranchHint default_hint)
 
V< None > REDUCE Store (OpIndex base_idx, OptionalOpIndex index, OpIndex value, StoreOp::Kind kind, MemoryRepresentation stored_rep, WriteBarrierKind write_barrier, int32_t offset, uint8_t element_scale, bool maybe_initializing_or_transitioning, IndirectPointerTag maybe_indirect_pointer_tag)
 
OpIndex REDUCE Load (OpIndex base_idx, OptionalOpIndex index, LoadOp::Kind kind, MemoryRepresentation loaded_rep, RegisterRepresentation result_rep, int32_t offset, uint8_t element_scale)
 

Private Member Functions

V< Word32ReduceCompareEqual (V< Any > left, V< Any > right, RegisterRepresentation rep)
 
bool TryAdjustOffset (int32_t *offset, const Operation &maybe_constant, uint8_t element_scale, bool tagged_base)
 
bool TryAdjustIndex (int32_t offset, OpIndex *index, const Operation &maybe_constant, uint8_t element_scale)
 
bool TryAdjustElementScale (uint8_t *element_scale, OpIndex maybe_constant)
 
OpIndex ReduceMemoryIndex (OpIndex index, int32_t *offset, uint8_t *element_scale, bool tagged_base)
 
bool IsFloat32ConvertedToFloat64 (V< Any > value)
 
V< Float32UndoFloat32ToFloat64Conversion (V< Float64 > value)
 
bool IsBit (V< Word > value)
 
bool IsInt8 (V< Word > value)
 
bool IsInt16 (V< Word > value)
 
bool IsWord32ConvertedToWord64 (V< Any > value, std::optional< bool > *sign_extended=nullptr)
 
V< Word32UndoWord32ToWord64Conversion (V< Word > value)
 
V< WordTryRemoveWord32ToWord64Conversion (V< Word > value)
 
uint64_t TruncateWord (uint64_t value, WordRepresentation rep)
 
V< WordReduceWithTruncation (V< Word > value, uint64_t truncation_mask, WordRepresentation rep)
 
V< WordReduceSignedDiv (V< Word > left, int64_t right, WordRepresentation rep)
 
V< WordReduceUnsignedDiv (V< Word > left, uint64_t right, WordRepresentation rep)
 
std::optional< V< Word32 > > ReduceBranchCondition (V< Word32 > condition, bool *negated)
 
std::optional< boolMatchBoolConstant (V< Any > condition)
 
bool MapLoadCanBeConstantFolded (OptionalMapRef map)
 

Static Private Member Functions

static constexpr bool IsNegativePowerOfTwo (int64_t x)
 
static constexpr uint16_t CountLeadingSignBits (int64_t c, WordRepresentation rep)
 

Private Attributes

JSHeapBrokerbroker = __ data() -> broker()
 
const OperationMatchermatcher_ = __ matcher()
 

Static Private Attributes

static constexpr bool signalling_nan_possible = false
 

Detailed Description

template<class Next>
class v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >

Definition at line 181 of file machine-optimization-reducer.h.

Member Function Documentation

◆ BitcastWord32PairToFloat64()

template<class Next >
V< Float64 > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::BitcastWord32PairToFloat64 ( V< Word32 > hi_word32,
V< Word32 > lo_word32 )
inline

Definition at line 308 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ Branch()

template<class Next >
V< None > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Branch ( OpIndex condition,
Block * if_true,
Block * if_false,
BranchHint hint )
inline

Definition at line 1759 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ Change()

Definition at line 198 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ Comparison()

template<class Next >
V< Word32 > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Comparison ( V< Any > left,
V< Any > right,
ComparisonOp::Kind kind,
RegisterRepresentation rep )
inline

Definition at line 1359 of file machine-optimization-reducer.h.

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

◆ CountLeadingSignBits()

template<class Next >
static constexpr uint16_t v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::CountLeadingSignBits ( int64_t c,
WordRepresentation rep )
inlinestaticconstexprprivate

Definition at line 2846 of file machine-optimization-reducer.h.

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

◆ DeoptimizeIf()

template<class Next >
V< None > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::DeoptimizeIf ( V< Word32 > condition,
V< FrameState > frame_state,
bool negated,
const DeoptimizeParameters * parameters )
inline

Definition at line 1788 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ FloatBinop()

template<class Next >
V< Float > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::FloatBinop ( V< Float > lhs,
V< Float > rhs,
FloatBinopOp::Kind kind,
FloatRepresentation rep )
inline

Definition at line 571 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ FloatUnary()

template<class Next >
V< Float > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::FloatUnary ( V< Float > input,
FloatUnaryOp::Kind kind,
FloatRepresentation rep )
inline

Definition at line 386 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ IsBit()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsBit ( V< Word > value)
inlineprivate

Definition at line 2488 of file machine-optimization-reducer.h.

Here is the caller graph for this function:

◆ IsFloat32ConvertedToFloat64()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsFloat32ConvertedToFloat64 ( V< Any > value)
inlineprivate

Definition at line 2460 of file machine-optimization-reducer.h.

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

◆ IsInt16()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsInt16 ( V< Word > value)
inlineprivate

Definition at line 2497 of file machine-optimization-reducer.h.

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

◆ IsInt8()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsInt8 ( V< Word > value)
inlineprivate

Definition at line 2490 of file machine-optimization-reducer.h.

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

◆ IsNegativePowerOfTwo()

template<class Next >
static constexpr bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsNegativePowerOfTwo ( int64_t x)
inlinestaticconstexprprivate

Definition at line 2838 of file machine-optimization-reducer.h.

Here is the caller graph for this function:

◆ IsWord32ConvertedToWord64()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::IsWord32ConvertedToWord64 ( V< Any > value,
std::optional< bool > * sign_extended = nullptr )
inlineprivate

Definition at line 2505 of file machine-optimization-reducer.h.

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

◆ Load()

template<class Next >
OpIndex REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Load ( OpIndex base_idx,
OptionalOpIndex index,
LoadOp::Kind kind,
MemoryRepresentation loaded_rep,
RegisterRepresentation result_rep,
int32_t offset,
uint8_t element_scale )
inline

Definition at line 1957 of file machine-optimization-reducer.h.

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

◆ MapLoadCanBeConstantFolded()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::MapLoadCanBeConstantFolded ( OptionalMapRef map)
inlineprivate

Definition at line 2821 of file machine-optimization-reducer.h.

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

◆ MatchBoolConstant()

template<class Next >
std::optional< bool > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::MatchBoolConstant ( V< Any > condition)
inlineprivate

Definition at line 2809 of file machine-optimization-reducer.h.

Here is the caller graph for this function:

◆ OverflowCheckedBinop()

template<class Next >
V< Tuple< Word, Word32 > > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::OverflowCheckedBinop ( V< Word > left,
V< Word > right,
OverflowCheckedBinopOp::Kind kind,
WordRepresentation rep )
inline

Definition at line 1262 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ ReduceBranchCondition()

template<class Next >
std::optional< V< Word32 > > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceBranchCondition ( V< Word32 > condition,
bool * negated )
inlineprivate

Definition at line 2730 of file machine-optimization-reducer.h.

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

◆ ReduceCompareEqual()

template<class Next >
V< Word32 > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceCompareEqual ( V< Any > left,
V< Any > right,
RegisterRepresentation rep )
inlineprivate

Definition at line 2228 of file machine-optimization-reducer.h.

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

◆ ReduceMemoryIndex()

template<class Next >
OpIndex v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceMemoryIndex ( OpIndex index,
int32_t * offset,
uint8_t * element_scale,
bool tagged_base )
inlineprivate

Definition at line 2422 of file machine-optimization-reducer.h.

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

◆ ReduceSignedDiv()

template<class Next >
V< Word > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceSignedDiv ( V< Word > left,
int64_t right,
WordRepresentation rep )
inlineprivate

Definition at line 2612 of file machine-optimization-reducer.h.

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

◆ ReduceUnsignedDiv()

template<class Next >
V< Word > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceUnsignedDiv ( V< Word > left,
uint64_t right,
WordRepresentation rep )
inlineprivate

Definition at line 2678 of file machine-optimization-reducer.h.

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

◆ ReduceWithTruncation()

template<class Next >
V< Word > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::ReduceWithTruncation ( V< Word > value,
uint64_t truncation_mask,
WordRepresentation rep )
inlineprivate

Definition at line 2567 of file machine-optimization-reducer.h.

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

◆ Select()

template<class Next >
V< Any > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Select ( V< Word32 > cond,
V< Any > vtrue,
V< Any > vfalse,
RegisterRepresentation rep,
BranchHint hint,
SelectOp::Implementation implem )
inline

Definition at line 1837 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ Shift()

template<class Next >
V< Word > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Shift ( V< Word > left,
V< Word32 > right,
ShiftOp::Kind kind,
WordRepresentation rep )
inline

Definition at line 1618 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ StaticAssert()

template<class Next >
V< None > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::StaticAssert ( V< Word32 > condition,
const char * source )
inline

Definition at line 1853 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ Store()

template<class Next >
V< None > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Store ( OpIndex base_idx,
OptionalOpIndex index,
OpIndex value,
StoreOp::Kind kind,
MemoryRepresentation stored_rep,
WriteBarrierKind write_barrier,
int32_t offset,
uint8_t element_scale,
bool maybe_initializing_or_transitioning,
IndirectPointerTag maybe_indirect_pointer_tag )
inline

Definition at line 1888 of file machine-optimization-reducer.h.

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

◆ Switch()

template<class Next >
V< None > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::Switch ( V< Word32 > input,
base::Vector< SwitchOp::Case > cases,
Block * default_case,
BranchHint default_hint )
inline

Definition at line 1869 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ TaggedBitcast()

template<class Next >
V< Any > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TaggedBitcast ( V< Any > input,
RegisterRepresentation from,
RegisterRepresentation to,
TaggedBitcastOp::Kind kind )
inline

Definition at line 322 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ TruncateWord()

template<class Next >
uint64_t v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TruncateWord ( uint64_t value,
WordRepresentation rep )
inlineprivate

Definition at line 2556 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ TryAdjustElementScale()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryAdjustElementScale ( uint8_t * element_scale,
OpIndex maybe_constant )
inlineprivate

Definition at line 2403 of file machine-optimization-reducer.h.

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

◆ TryAdjustIndex()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryAdjustIndex ( int32_t offset,
OpIndex * index,
const Operation & maybe_constant,
uint8_t element_scale )
inlineprivate

Definition at line 2382 of file machine-optimization-reducer.h.

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

◆ TryAdjustOffset()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryAdjustOffset ( int32_t * offset,
const Operation & maybe_constant,
uint8_t element_scale,
bool tagged_base )
inlineprivate

Definition at line 2355 of file machine-optimization-reducer.h.

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

◆ TryMatchHeapObject()

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryMatchHeapObject ( V< Any > idx,
int depth = 0 )
inline

Definition at line 1174 of file machine-optimization-reducer.h.

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

◆ TryReduceToRor()

template<class Next >
std::optional< V< Word > > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryReduceToRor ( V< Word > left,
V< Word > right,
WordBinopOp::Kind kind,
WordRepresentation rep )
inline

Definition at line 1193 of file machine-optimization-reducer.h.

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

◆ TryRemoveWord32ToWord64Conversion()

template<class Next >
V< Word > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::TryRemoveWord32ToWord64Conversion ( V< Word > value)
inlineprivate

Definition at line 2544 of file machine-optimization-reducer.h.

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

◆ UndoFloat32ToFloat64Conversion()

template<class Next >
V< Float32 > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::UndoFloat32ToFloat64Conversion ( V< Float64 > value)
inlineprivate

Definition at line 2474 of file machine-optimization-reducer.h.

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

◆ UndoWord32ToWord64Conversion()

template<class Next >
V< Word32 > v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::UndoWord32ToWord64Conversion ( V< Word > value)
inlineprivate

Definition at line 2536 of file machine-optimization-reducer.h.

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

◆ WordBinop()

template<class Next >
V< Word > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::WordBinop ( V< Word > left,
V< Word > right,
WordBinopOp::Kind kind,
WordRepresentation rep )
inline

Definition at line 751 of file machine-optimization-reducer.h.

Here is the call graph for this function:

◆ WordUnary()

template<class Next >
V< Word > REDUCE v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::WordUnary ( V< Word > input,
WordUnaryOp::Kind kind,
WordRepresentation rep )
inline

Definition at line 523 of file machine-optimization-reducer.h.

Here is the call graph for this function:

Member Data Documentation

◆ broker

template<class Next >
JSHeapBroker* v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::broker = __ data() -> broker()
private

Definition at line 2851 of file machine-optimization-reducer.h.

◆ matcher_

template<class Next >
const OperationMatcher& v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::matcher_ = __ matcher()
private

Definition at line 2852 of file machine-optimization-reducer.h.

◆ signalling_nan_possible

template<class Next >
bool v8::internal::compiler::turboshaft::MachineOptimizationReducer< Next >::signalling_nan_possible = false
staticconstexprprivate

Definition at line 2856 of file machine-optimization-reducer.h.


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