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

#include <graph.h>

Collaboration diagram for v8::internal::compiler::turboshaft::Graph:

Classes

class  OperationIterator
 
class  OpIndexIterator
 

Public Types

using MutableOperationIterator = OperationIterator<Operation, Graph>
 
using ConstOperationIterator
 

Public Member Functions

 Graph (Zone *graph_zone, size_t initial_capacity=2048)
 
void Reset ()
 
V8_INLINE const OperationGet (OpIndex i) const
 
V8_INLINE OperationGet (OpIndex i)
 
void KillOperation (OpIndex i)
 
BlockStartBlock ()
 
const BlockStartBlock () const
 
BlockGet (BlockIndex i)
 
const BlockGet (BlockIndex i) const
 
OpIndex Index (const Operation &op) const
 
BlockIndex BlockOf (OpIndex index) const
 
void SetBlockOf (BlockIndex block, OpIndex op)
 
BlockIndex BlockIndexOf (OpIndex op) const
 
BlockIndex BlockIndexOf (const Operation &op) const
 
OpIndex NextIndex (const OpIndex idx) const
 
OpIndex PreviousIndex (const OpIndex idx) const
 
OpIndex LastOperation () const
 
OperationStorageSlotAllocate (size_t slot_count)
 
void RemoveLast ()
 
template<class Op , class... Args>
V8_INLINE Op & Add (Args... args)
 
template<class Op , class... Args>
void Replace (OpIndex replaced, Args... args)
 
V8_INLINE BlockNewLoopHeader (const Block *origin=nullptr)
 
V8_INLINE BlockNewBlock (const Block *origin=nullptr)
 
V8_INLINE BlockNewBlock (Block::Kind kind, const Block *origin=nullptr)
 
V8_INLINE bool Add (Block *block)
 
void Finalize (Block *block)
 
void TurnLoopIntoMerge (Block *loop)
 
OpIndex next_operation_index () const
 
BlockIndex next_block_index () const
 
Blocklast_block ()
 
Zonegraph_zone () const
 
uint32_t block_count () const
 
uint32_t op_id_count () const
 
uint32_t NumberOfOperationsForDebugging () const
 
uint32_t op_id_capacity () const
 
OpIndex BeginIndex () const
 
OpIndex EndIndex () const
 
base::iterator_range< MutableOperationIteratorAllOperations ()
 
base::iterator_range< ConstOperationIteratorAllOperations () const
 
base::iterator_range< OpIndexIteratorAllOperationIndices () const
 
base::iterator_range< MutableOperationIteratoroperations (const Block &block)
 
base::iterator_range< ConstOperationIteratoroperations (const Block &block) const
 
base::iterator_range< OpIndexIteratorOperationIndices (const Block &block) const
 
base::iterator_range< ConstOperationIteratoroperations (OpIndex begin, OpIndex end) const
 
base::iterator_range< MutableOperationIteratoroperations (OpIndex begin, OpIndex end)
 
base::iterator_range< OpIndexIteratorOperationIndices (OpIndex begin, OpIndex end) const
 
base::iterator_range< base::DerefPtrIterator< Block > > blocks ()
 
base::iterator_range< base::DerefPtrIterator< const Block > > blocks () const
 
const ZoneVector< Block * > & blocks_vector () const
 
bool IsLoopBackedge (const GotoOp &op) const
 
bool IsValid (OpIndex i) const
 
const GrowingOpIndexSidetable< SourcePosition > & source_positions () const
 
GrowingOpIndexSidetable< SourcePosition > & source_positions ()
 
const GrowingOpIndexSidetable< OpIndex > & operation_origins () const
 
GrowingOpIndexSidetable< OpIndex > & operation_origins ()
 
uint32_t DominatorTreeDepth () const
 
const GrowingOpIndexSidetable< Type > & operation_types () const
 
GrowingOpIndexSidetable< Type > & operation_types ()
 
void ReorderBlocks (base::Vector< uint32_t > permutation)
 
GraphGetOrCreateCompanion ()
 
void SwapWithCompanion ()
 
void set_loop_unrolling_analyzer (LoopUnrollingAnalyzer *loop_unrolling_analyzer)
 
void clear_loop_unrolling_analyzer ()
 
LoopUnrollingAnalyzerloop_unrolling_analyzer () const
 
void clear_stack_checks_to_remove ()
 
ZoneAbslFlatHashSet< uint32_t > & stack_checks_to_remove ()
 
const ZoneAbslFlatHashSet< uint32_t > & stack_checks_to_remove () const
 

Private Member Functions

bool InputsValid (const Operation &op) const
 
template<class Op >
void IncrementInputUses (const Op &op)
 
template<class Op >
void DecrementInputUses (const Op &op)
 
V8_NOINLINE V8_PRESERVE_MOST void AllocateNewBlocks ()
 

Private Attributes

OperationBuffer operations_
 
ZoneVector< Block * > bound_blocks_
 
base::Vector< Block * > all_blocks_
 
size_t next_block_ = 0
 
GrowingOpIndexSidetable< BlockIndexop_to_block_
 
ZoneVector< Block * > block_permutation_
 
Zonegraph_zone_
 
GrowingOpIndexSidetable< SourcePositionsource_positions_
 
GrowingOpIndexSidetable< OpIndexoperation_origins_
 
uint32_t dominator_tree_depth_ = 0
 
GrowingOpIndexSidetable< Typeoperation_types_
 
Graphcompanion_ = nullptr
 
LoopUnrollingAnalyzerloop_unrolling_analyzer_ = nullptr
 
ZoneAbslFlatHashSet< uint32_t > stack_checks_to_remove_
 

Detailed Description

Definition at line 578 of file graph.h.

Member Typedef Documentation

◆ ConstOperationIterator

Initial value:
OperationIterator<const Operation, const Graph>

Definition at line 934 of file graph.h.

◆ MutableOperationIterator

Constructor & Destructor Documentation

◆ Graph()

v8::internal::compiler::turboshaft::Graph::Graph ( Zone * graph_zone,
size_t initial_capacity = 2048 )
inlineexplicit

Definition at line 582 of file graph.h.

Member Function Documentation

◆ Add() [1/2]

template<class Op , class... Args>
V8_INLINE Op & v8::internal::compiler::turboshaft::Graph::Add ( Args... args)
inline

Definition at line 721 of file graph.h.

Here is the call graph for this function:

◆ Add() [2/2]

V8_INLINE bool v8::internal::compiler::turboshaft::Graph::Add ( Block * block)
inline

Definition at line 783 of file graph.h.

Here is the call graph for this function:

◆ Allocate()

OperationStorageSlot * v8::internal::compiler::turboshaft::Graph::Allocate ( size_t slot_count)
inline

Definition at line 706 of file graph.h.

Here is the call graph for this function:

◆ AllocateNewBlocks()

V8_NOINLINE V8_PRESERVE_MOST void v8::internal::compiler::turboshaft::Graph::AllocateNewBlocks ( )
inlineprivate

Definition at line 1152 of file graph.h.

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

◆ AllOperationIndices()

base::iterator_range< OpIndexIterator > v8::internal::compiler::turboshaft::Graph::AllOperationIndices ( ) const
inline

Definition at line 944 of file graph.h.

Here is the call graph for this function:

◆ AllOperations() [1/2]

base::iterator_range< MutableOperationIterator > v8::internal::compiler::turboshaft::Graph::AllOperations ( )
inline

Definition at line 937 of file graph.h.

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

◆ AllOperations() [2/2]

base::iterator_range< ConstOperationIterator > v8::internal::compiler::turboshaft::Graph::AllOperations ( ) const
inline

Definition at line 940 of file graph.h.

Here is the call graph for this function:

◆ BeginIndex()

OpIndex v8::internal::compiler::turboshaft::Graph::BeginIndex ( ) const
inline

Definition at line 857 of file graph.h.

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

◆ block_count()

uint32_t v8::internal::compiler::turboshaft::Graph::block_count ( ) const
inline

Definition at line 840 of file graph.h.

Here is the caller graph for this function:

◆ BlockIndexOf() [1/2]

BlockIndex v8::internal::compiler::turboshaft::Graph::BlockIndexOf ( const Operation & op) const
inline

Definition at line 684 of file graph.h.

Here is the call graph for this function:

◆ BlockIndexOf() [2/2]

BlockIndex v8::internal::compiler::turboshaft::Graph::BlockIndexOf ( OpIndex op) const
inline

Definition at line 682 of file graph.h.

◆ BlockOf()

BlockIndex v8::internal::compiler::turboshaft::Graph::BlockOf ( OpIndex index) const
inline

Definition at line 662 of file graph.h.

◆ blocks() [1/2]

base::iterator_range< base::DerefPtrIterator< Block > > v8::internal::compiler::turboshaft::Graph::blocks ( )
inline

Definition at line 984 of file graph.h.

Here is the caller graph for this function:

◆ blocks() [2/2]

base::iterator_range< base::DerefPtrIterator< const Block > > v8::internal::compiler::turboshaft::Graph::blocks ( ) const
inline

Definition at line 989 of file graph.h.

◆ blocks_vector()

const ZoneVector< Block * > & v8::internal::compiler::turboshaft::Graph::blocks_vector ( ) const
inline

Definition at line 994 of file graph.h.

◆ clear_loop_unrolling_analyzer()

void v8::internal::compiler::turboshaft::Graph::clear_loop_unrolling_analyzer ( )
inline

Definition at line 1102 of file graph.h.

◆ clear_stack_checks_to_remove()

void v8::internal::compiler::turboshaft::Graph::clear_stack_checks_to_remove ( )
inline

Definition at line 1113 of file graph.h.

◆ DecrementInputUses()

template<class Op >
void v8::internal::compiler::turboshaft::Graph::DecrementInputUses ( const Op & op)
inlineprivate

Definition at line 1140 of file graph.h.

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

◆ DominatorTreeDepth()

uint32_t v8::internal::compiler::turboshaft::Graph::DominatorTreeDepth ( ) const
inline

Definition at line 1017 of file graph.h.

◆ EndIndex()

OpIndex v8::internal::compiler::turboshaft::Graph::EndIndex ( ) const
inline

Definition at line 864 of file graph.h.

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

◆ Finalize()

void v8::internal::compiler::turboshaft::Graph::Finalize ( Block * block)
inline

Definition at line 810 of file graph.h.

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

◆ Get() [1/4]

Block & v8::internal::compiler::turboshaft::Graph::Get ( BlockIndex i)
inline

Definition at line 646 of file graph.h.

◆ Get() [2/4]

const Block & v8::internal::compiler::turboshaft::Graph::Get ( BlockIndex i) const
inline

Definition at line 650 of file graph.h.

◆ Get() [3/4]

V8_INLINE Operation & v8::internal::compiler::turboshaft::Graph::Get ( OpIndex i)
inline

Definition at line 629 of file graph.h.

Here is the call graph for this function:

◆ Get() [4/4]

V8_INLINE const Operation & v8::internal::compiler::turboshaft::Graph::Get ( OpIndex i) const
inline

Definition at line 618 of file graph.h.

Here is the call graph for this function:

◆ GetOrCreateCompanion()

Graph & v8::internal::compiler::turboshaft::Graph::GetOrCreateCompanion ( )
inline

Definition at line 1049 of file graph.h.

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

◆ graph_zone()

Zone * v8::internal::compiler::turboshaft::Graph::graph_zone ( ) const
inline

Definition at line 839 of file graph.h.

Here is the caller graph for this function:

◆ IncrementInputUses()

template<class Op >
void v8::internal::compiler::turboshaft::Graph::IncrementInputUses ( const Op & op)
inlineprivate

Definition at line 1130 of file graph.h.

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

◆ Index()

OpIndex v8::internal::compiler::turboshaft::Graph::Index ( const Operation & op) const
inline

Definition at line 655 of file graph.h.

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

◆ InputsValid()

bool v8::internal::compiler::turboshaft::Graph::InputsValid ( const Operation & op) const
inlineprivate

Definition at line 1122 of file graph.h.

Here is the call graph for this function:

◆ IsLoopBackedge()

bool v8::internal::compiler::turboshaft::Graph::IsLoopBackedge ( const GotoOp & op) const
inline

Definition at line 996 of file graph.h.

Here is the call graph for this function:

◆ IsValid()

bool v8::internal::compiler::turboshaft::Graph::IsValid ( OpIndex i) const
inline

Definition at line 1001 of file graph.h.

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

◆ KillOperation()

void v8::internal::compiler::turboshaft::Graph::KillOperation ( OpIndex i)
inline

Definition at line 641 of file graph.h.

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

◆ last_block()

Block * v8::internal::compiler::turboshaft::Graph::last_block ( )
inline

Definition at line 837 of file graph.h.

◆ LastOperation()

OpIndex v8::internal::compiler::turboshaft::Graph::LastOperation ( ) const
inline

Definition at line 702 of file graph.h.

Here is the call graph for this function:

◆ loop_unrolling_analyzer()

LoopUnrollingAnalyzer * v8::internal::compiler::turboshaft::Graph::loop_unrolling_analyzer ( ) const
inline

Definition at line 1103 of file graph.h.

Here is the caller graph for this function:

◆ NewBlock() [1/2]

V8_INLINE Block * v8::internal::compiler::turboshaft::Graph::NewBlock ( Block::Kind kind,
const Block * origin = nullptr )
inline

Definition at line 770 of file graph.h.

Here is the call graph for this function:

◆ NewBlock() [2/2]

V8_INLINE Block * v8::internal::compiler::turboshaft::Graph::NewBlock ( const Block * origin = nullptr)
inline

Definition at line 766 of file graph.h.

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

◆ NewLoopHeader()

V8_INLINE Block * v8::internal::compiler::turboshaft::Graph::NewLoopHeader ( const Block * origin = nullptr)
inline

Definition at line 763 of file graph.h.

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

◆ next_block_index()

BlockIndex v8::internal::compiler::turboshaft::Graph::next_block_index ( ) const
inline

Definition at line 833 of file graph.h.

Here is the caller graph for this function:

◆ next_operation_index()

OpIndex v8::internal::compiler::turboshaft::Graph::next_operation_index ( ) const
inline

Definition at line 832 of file graph.h.

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

◆ NextIndex()

OpIndex v8::internal::compiler::turboshaft::Graph::NextIndex ( const OpIndex idx) const
inline

Definition at line 688 of file graph.h.

Here is the call graph for this function:

◆ NumberOfOperationsForDebugging()

uint32_t v8::internal::compiler::turboshaft::Graph::NumberOfOperationsForDebugging ( ) const
inline

Definition at line 846 of file graph.h.

Here is the call graph for this function:

◆ op_id_capacity()

uint32_t v8::internal::compiler::turboshaft::Graph::op_id_capacity ( ) const
inline

Definition at line 853 of file graph.h.

Here is the call graph for this function:

◆ op_id_count()

uint32_t v8::internal::compiler::turboshaft::Graph::op_id_count ( ) const
inline

Definition at line 843 of file graph.h.

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

◆ operation_origins() [1/2]

GrowingOpIndexSidetable< OpIndex > & v8::internal::compiler::turboshaft::Graph::operation_origins ( )
inline

Definition at line 1013 of file graph.h.

◆ operation_origins() [2/2]

const GrowingOpIndexSidetable< OpIndex > & v8::internal::compiler::turboshaft::Graph::operation_origins ( ) const
inline

Definition at line 1010 of file graph.h.

◆ operation_types() [1/2]

GrowingOpIndexSidetable< Type > & v8::internal::compiler::turboshaft::Graph::operation_types ( )
inline

Definition at line 1022 of file graph.h.

◆ operation_types() [2/2]

const GrowingOpIndexSidetable< Type > & v8::internal::compiler::turboshaft::Graph::operation_types ( ) const
inline

Definition at line 1019 of file graph.h.

◆ OperationIndices() [1/2]

base::iterator_range< OpIndexIterator > v8::internal::compiler::turboshaft::Graph::OperationIndices ( const Block & block) const
inline

Definition at line 957 of file graph.h.

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

◆ OperationIndices() [2/2]

base::iterator_range< OpIndexIterator > v8::internal::compiler::turboshaft::Graph::OperationIndices ( OpIndex begin,
OpIndex end ) const
inline

Definition at line 977 of file graph.h.

Here is the call graph for this function:

◆ operations() [1/4]

base::iterator_range< MutableOperationIterator > v8::internal::compiler::turboshaft::Graph::operations ( const Block & block)
inline

Definition at line 948 of file graph.h.

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

◆ operations() [2/4]

base::iterator_range< ConstOperationIterator > v8::internal::compiler::turboshaft::Graph::operations ( const Block & block) const
inline

Definition at line 952 of file graph.h.

Here is the call graph for this function:

◆ operations() [3/4]

base::iterator_range< MutableOperationIterator > v8::internal::compiler::turboshaft::Graph::operations ( OpIndex begin,
OpIndex end )
inline

Definition at line 969 of file graph.h.

Here is the call graph for this function:

◆ operations() [4/4]

base::iterator_range< ConstOperationIterator > v8::internal::compiler::turboshaft::Graph::operations ( OpIndex begin,
OpIndex end ) const
inline

Definition at line 962 of file graph.h.

Here is the call graph for this function:

◆ PreviousIndex()

OpIndex v8::internal::compiler::turboshaft::Graph::PreviousIndex ( const OpIndex idx) const
inline

Definition at line 695 of file graph.h.

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

◆ RemoveLast()

void v8::internal::compiler::turboshaft::Graph::RemoveLast ( )
inline

Definition at line 710 of file graph.h.

Here is the call graph for this function:

◆ ReorderBlocks()

void v8::internal::compiler::turboshaft::Graph::ReorderBlocks ( base::Vector< uint32_t > permutation)
inline

Definition at line 1036 of file graph.h.

Here is the call graph for this function:

◆ Replace()

template<class Op , class... Args>
void v8::internal::compiler::turboshaft::Graph::Replace ( OpIndex replaced,
Args... args )
inline

Definition at line 745 of file graph.h.

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

◆ Reset()

void v8::internal::compiler::turboshaft::Graph::Reset ( )
inline

Definition at line 599 of file graph.h.

Here is the call graph for this function:

◆ set_loop_unrolling_analyzer()

void v8::internal::compiler::turboshaft::Graph::set_loop_unrolling_analyzer ( LoopUnrollingAnalyzer * loop_unrolling_analyzer)
inline

Definition at line 1097 of file graph.h.

Here is the call graph for this function:

◆ SetBlockOf()

void v8::internal::compiler::turboshaft::Graph::SetBlockOf ( BlockIndex block,
OpIndex op )
inline

Definition at line 680 of file graph.h.

Here is the caller graph for this function:

◆ source_positions() [1/2]

GrowingOpIndexSidetable< SourcePosition > & v8::internal::compiler::turboshaft::Graph::source_positions ( )
inline

Definition at line 1006 of file graph.h.

◆ source_positions() [2/2]

const GrowingOpIndexSidetable< SourcePosition > & v8::internal::compiler::turboshaft::Graph::source_positions ( ) const
inline

Definition at line 1003 of file graph.h.

Here is the caller graph for this function:

◆ stack_checks_to_remove() [1/2]

ZoneAbslFlatHashSet< uint32_t > & v8::internal::compiler::turboshaft::Graph::stack_checks_to_remove ( )
inline

Definition at line 1114 of file graph.h.

◆ stack_checks_to_remove() [2/2]

const ZoneAbslFlatHashSet< uint32_t > & v8::internal::compiler::turboshaft::Graph::stack_checks_to_remove ( ) const
inline

Definition at line 1117 of file graph.h.

◆ StartBlock() [1/2]

Block & v8::internal::compiler::turboshaft::Graph::StartBlock ( )
inline

Definition at line 643 of file graph.h.

Here is the call graph for this function:

◆ StartBlock() [2/2]

const Block & v8::internal::compiler::turboshaft::Graph::StartBlock ( ) const
inline

Definition at line 644 of file graph.h.

Here is the call graph for this function:

◆ SwapWithCompanion()

void v8::internal::compiler::turboshaft::Graph::SwapWithCompanion ( )
inline

Definition at line 1062 of file graph.h.

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

◆ TurnLoopIntoMerge()

void v8::internal::compiler::turboshaft::Graph::TurnLoopIntoMerge ( Block * loop)
inline

Definition at line 819 of file graph.h.

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

Member Data Documentation

◆ all_blocks_

base::Vector<Block*> v8::internal::compiler::turboshaft::Graph::all_blocks_
private

Definition at line 1186 of file graph.h.

◆ block_permutation_

ZoneVector<Block*> v8::internal::compiler::turboshaft::Graph::block_permutation_
private

Definition at line 1192 of file graph.h.

◆ bound_blocks_

ZoneVector<Block*> v8::internal::compiler::turboshaft::Graph::bound_blocks_
private

Definition at line 1180 of file graph.h.

◆ companion_

Graph* v8::internal::compiler::turboshaft::Graph::companion_ = nullptr
private

Definition at line 1203 of file graph.h.

◆ dominator_tree_depth_

uint32_t v8::internal::compiler::turboshaft::Graph::dominator_tree_depth_ = 0
private

Definition at line 1196 of file graph.h.

◆ graph_zone_

Zone* v8::internal::compiler::turboshaft::Graph::graph_zone_
private

Definition at line 1193 of file graph.h.

◆ loop_unrolling_analyzer_

LoopUnrollingAnalyzer* v8::internal::compiler::turboshaft::Graph::loop_unrolling_analyzer_ = nullptr
private

Definition at line 1212 of file graph.h.

◆ next_block_

size_t v8::internal::compiler::turboshaft::Graph::next_block_ = 0
private

Definition at line 1187 of file graph.h.

◆ op_to_block_

GrowingOpIndexSidetable<BlockIndex> v8::internal::compiler::turboshaft::Graph::op_to_block_
private

Definition at line 1188 of file graph.h.

◆ operation_origins_

GrowingOpIndexSidetable<OpIndex> v8::internal::compiler::turboshaft::Graph::operation_origins_
private

Definition at line 1195 of file graph.h.

◆ operation_types_

GrowingOpIndexSidetable<Type> v8::internal::compiler::turboshaft::Graph::operation_types_
private

Definition at line 1197 of file graph.h.

◆ operations_

OperationBuffer v8::internal::compiler::turboshaft::Graph::operations_
private

Definition at line 1179 of file graph.h.

◆ source_positions_

GrowingOpIndexSidetable<SourcePosition> v8::internal::compiler::turboshaft::Graph::source_positions_
private

Definition at line 1194 of file graph.h.

◆ stack_checks_to_remove_

ZoneAbslFlatHashSet<uint32_t> v8::internal::compiler::turboshaft::Graph::stack_checks_to_remove_
private

Definition at line 1223 of file graph.h.


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