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

#include <graph.h>

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

Public Types

enum class  Kind : uint8_t { kMerge , kLoopHeader , kBranchTarget }
 
enum class  CustomDataKind { kUnset , kPhiInputIndex , kDeferredInSchedule }
 

Public Member Functions

 Block (Kind kind)
 
bool IsLoopOrMerge () const
 
bool IsLoop () const
 
bool IsMerge () const
 
bool IsBranchTarget () const
 
Kind kind () const
 
void SetKind (Kind kind)
 
BlockIndex index () const
 
bool Contains (OpIndex op_idx) const
 
bool IsBound () const
 
base::SmallVector< Block *, 8 > Predecessors () const
 
NeighboringPredecessorIterable PredecessorsIterable () const
 
int PredecessorCount () const
 
int GetPredecessorIndex (const Block *target) const
 
BlockLastPredecessor () const
 
BlockNeighboringPredecessor () const
 
bool HasPredecessors () const
 
void ResetLastPredecessor ()
 
void ResetAllPredecessors ()
 
Blocksingle_loop_predecessor () const
 
void SetSingleLoopPredecessor (Block *single_loop_predecessor)
 
void SetOrigin (const Block *origin)
 
const BlockOriginForBlockEnd () const
 
const BlockOriginForLoopHeader () const
 
bool IsComplete () const
 
OpIndex begin () const
 
OpIndex end () const
 
int OpCountUpperBound () const
 
const OperationFirstOperation (const Graph &graph) const
 
const OperationLastOperation (const Graph &graph) const
 
OperationLastOperation (Graph &graph) const
 
bool EndsWithBranchingOp (const Graph &graph) const
 
bool HasPhis (const Graph &graph) const
 
bool HasBackedge (const Graph &graph) const
 
uint32_t ComputeDominator ()
 
void PrintDominatorTree (std::vector< const char * > tree_symbols=std::vector< const char * >(), bool has_next=false) const
 
void set_custom_data (uint32_t data, CustomDataKind kind_for_debug_check)
 
uint32_t get_custom_data (CustomDataKind kind_for_debug_check) const
 
void clear_custom_data ()
 
- Public Member Functions inherited from v8::internal::compiler::turboshaft::RandomAccessStackDominatorNode< Block >
void SetDominator (Block *dominator)
 
void SetAsDominatorRoot ()
 
BlockGetDominator () const
 
BlockGetCommonDominator (RandomAccessStackDominatorNode< Block > *other) const
 
bool IsDominatedBy (const Block *other) const
 
int Depth () const
 
- Public Member Functions inherited from v8::internal::compiler::turboshaft::DominatorForwardTreeNode< Block >
void AddChild (Block *next)
 
BlockLastChild () const
 
BlockNeighboringChild () const
 
bool HasChildren () const
 
base::SmallVector< Block *, 8 > Children () const
 

Static Public Attributes

static constexpr int kInvalidPredecessorIndex = -1
 

Private Member Functions

void AddPredecessor (Block *predecessor)
 

Private Attributes

Kind kind_
 
OpIndex begin_ = OpIndex::Invalid()
 
OpIndex end_ = OpIndex::Invalid()
 
BlockIndex index_ = BlockIndex::Invalid()
 
Blocklast_predecessor_ = nullptr
 
Blockneighboring_predecessor_ = nullptr
 
Blocksingle_loop_predecessor_ = nullptr
 
uint32_t predecessor_count_ = 0
 
const Blockorigin_ = nullptr
 
uint32_t custom_data_ = 0
 

Friends

class Graph
 
template<class Reducers >
class Assembler
 
template<class Assembler >
class GraphVisitor
 

Detailed Description

Definition at line 306 of file graph.h.

Member Enumeration Documentation

◆ CustomDataKind

Enumerator
kUnset 
kPhiInputIndex 
kDeferredInSchedule 

Definition at line 503 of file graph.h.

◆ Kind

Enumerator
kMerge 
kLoopHeader 
kBranchTarget 

Definition at line 308 of file graph.h.

Constructor & Destructor Documentation

◆ Block()

v8::internal::compiler::turboshaft::Block::Block ( Kind kind)
inlineexplicit

Definition at line 310 of file graph.h.

Member Function Documentation

◆ AddPredecessor()

void v8::internal::compiler::turboshaft::Block::AddPredecessor ( Block * predecessor)
inlineprivate

Definition at line 532 of file graph.h.

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

◆ begin()

OpIndex v8::internal::compiler::turboshaft::Block::begin ( ) const
inline

Definition at line 438 of file graph.h.

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

◆ clear_custom_data()

void v8::internal::compiler::turboshaft::Block::clear_custom_data ( )
inline

Definition at line 521 of file graph.h.

◆ ComputeDominator()

uint32_t v8::internal::compiler::turboshaft::Block::ComputeDominator ( )
inline

Definition at line 1280 of file graph.h.

Here is the call graph for this function:

◆ Contains()

bool v8::internal::compiler::turboshaft::Block::Contains ( OpIndex op_idx) const
inline

Definition at line 322 of file graph.h.

Here is the caller graph for this function:

◆ end()

OpIndex v8::internal::compiler::turboshaft::Block::end ( ) const
inline

Definition at line 442 of file graph.h.

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

◆ EndsWithBranchingOp()

bool v8::internal::compiler::turboshaft::Block::EndsWithBranchingOp ( const Graph & graph) const
inline

Definition at line 457 of file graph.h.

Here is the call graph for this function:

◆ FirstOperation()

V8_INLINE const Operation & v8::internal::compiler::turboshaft::Block::FirstOperation ( const Graph & graph) const

Definition at line 1235 of file graph.h.

Here is the call graph for this function:

◆ get_custom_data()

uint32_t v8::internal::compiler::turboshaft::Block::get_custom_data ( CustomDataKind kind_for_debug_check) const
inline

Definition at line 516 of file graph.h.

Here is the caller graph for this function:

◆ GetPredecessorIndex()

int v8::internal::compiler::turboshaft::Block::GetPredecessorIndex ( const Block * target) const
inline

Definition at line 368 of file graph.h.

Here is the caller graph for this function:

◆ HasBackedge()

bool v8::internal::compiler::turboshaft::Block::HasBackedge ( const Graph & graph) const
inline

Definition at line 471 of file graph.h.

Here is the call graph for this function:

◆ HasPhis()

V8_INLINE bool v8::internal::compiler::turboshaft::Block::HasPhis ( const Graph & graph) const

Definition at line 1252 of file graph.h.

Here is the caller graph for this function:

◆ HasPredecessors()

bool v8::internal::compiler::turboshaft::Block::HasPredecessors ( ) const
inline

Definition at line 387 of file graph.h.

◆ index()

BlockIndex v8::internal::compiler::turboshaft::Block::index ( ) const
inline

Definition at line 320 of file graph.h.

Here is the caller graph for this function:

◆ IsBound()

bool v8::internal::compiler::turboshaft::Block::IsBound ( ) const
inline

Definition at line 326 of file graph.h.

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

◆ IsBranchTarget()

bool v8::internal::compiler::turboshaft::Block::IsBranchTarget ( ) const
inline

Definition at line 315 of file graph.h.

Here is the caller graph for this function:

◆ IsComplete()

bool v8::internal::compiler::turboshaft::Block::IsComplete ( ) const
inline

Definition at line 437 of file graph.h.

Here is the call graph for this function:

◆ IsLoop()

bool v8::internal::compiler::turboshaft::Block::IsLoop ( ) const
inline

Definition at line 313 of file graph.h.

Here is the caller graph for this function:

◆ IsLoopOrMerge()

bool v8::internal::compiler::turboshaft::Block::IsLoopOrMerge ( ) const
inline

Definition at line 312 of file graph.h.

Here is the call graph for this function:

◆ IsMerge()

bool v8::internal::compiler::turboshaft::Block::IsMerge ( ) const
inline

Definition at line 314 of file graph.h.

Here is the caller graph for this function:

◆ kind()

Kind v8::internal::compiler::turboshaft::Block::kind ( ) const
inline

Definition at line 317 of file graph.h.

Here is the caller graph for this function:

◆ LastOperation() [1/2]

V8_INLINE const Operation & v8::internal::compiler::turboshaft::Block::LastOperation ( const Graph & graph) const

Definition at line 1242 of file graph.h.

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

◆ LastOperation() [2/2]

V8_INLINE Operation & v8::internal::compiler::turboshaft::Block::LastOperation ( Graph & graph) const

Definition at line 1247 of file graph.h.

Here is the call graph for this function:

◆ LastPredecessor()

Block * v8::internal::compiler::turboshaft::Block::LastPredecessor ( ) const
inline

Definition at line 385 of file graph.h.

Here is the caller graph for this function:

◆ NeighboringPredecessor()

Block * v8::internal::compiler::turboshaft::Block::NeighboringPredecessor ( ) const
inline

Definition at line 386 of file graph.h.

Here is the caller graph for this function:

◆ OpCountUpperBound()

int v8::internal::compiler::turboshaft::Block::OpCountUpperBound ( ) const
inline

Definition at line 451 of file graph.h.

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

◆ OriginForBlockEnd()

const Block * v8::internal::compiler::turboshaft::Block::OriginForBlockEnd ( ) const
inline

Definition at line 428 of file graph.h.

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

◆ OriginForLoopHeader()

const Block * v8::internal::compiler::turboshaft::Block::OriginForLoopHeader ( ) const
inline

Definition at line 432 of file graph.h.

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

◆ PredecessorCount()

int v8::internal::compiler::turboshaft::Block::PredecessorCount ( ) const
inline

Definition at line 344 of file graph.h.

Here is the caller graph for this function:

◆ Predecessors()

base::SmallVector< Block *, 8 > v8::internal::compiler::turboshaft::Block::Predecessors ( ) const
inline

Definition at line 328 of file graph.h.

Here is the caller graph for this function:

◆ PredecessorsIterable()

NeighboringPredecessorIterable v8::internal::compiler::turboshaft::Block::PredecessorsIterable ( ) const
inline

Definition at line 340 of file graph.h.

Here is the caller graph for this function:

◆ PrintDominatorTree()

void v8::internal::compiler::turboshaft::Block::PrintDominatorTree ( std::vector< const char * > tree_symbols = std::vector<const char*>(),
bool has_next = false ) const

Definition at line 36 of file graph.cc.

Here is the call graph for this function:

◆ ResetAllPredecessors()

void v8::internal::compiler::turboshaft::Block::ResetAllPredecessors ( )
inline

Definition at line 395 of file graph.h.

Here is the caller graph for this function:

◆ ResetLastPredecessor()

void v8::internal::compiler::turboshaft::Block::ResetLastPredecessor ( )
inline

Definition at line 391 of file graph.h.

Here is the caller graph for this function:

◆ set_custom_data()

void v8::internal::compiler::turboshaft::Block::set_custom_data ( uint32_t data,
CustomDataKind kind_for_debug_check )
inline

Definition at line 509 of file graph.h.

Here is the caller graph for this function:

◆ SetKind()

void v8::internal::compiler::turboshaft::Block::SetKind ( Kind kind)
inline

Definition at line 318 of file graph.h.

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

◆ SetOrigin()

void v8::internal::compiler::turboshaft::Block::SetOrigin ( const Block * origin)
inline

Definition at line 420 of file graph.h.

Here is the caller graph for this function:

◆ SetSingleLoopPredecessor()

void v8::internal::compiler::turboshaft::Block::SetSingleLoopPredecessor ( Block * single_loop_predecessor)
inline

Definition at line 410 of file graph.h.

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

◆ single_loop_predecessor()

Block * v8::internal::compiler::turboshaft::Block::single_loop_predecessor ( ) const
inline

Definition at line 406 of file graph.h.

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

Friends And Related Symbol Documentation

◆ Assembler

template<class Reducers >
friend class Assembler
friend

Definition at line 565 of file graph.h.

◆ Graph

friend class Graph
friend

Definition at line 563 of file graph.h.

◆ GraphVisitor

template<class Assembler >
friend class GraphVisitor
friend

Definition at line 567 of file graph.h.

Member Data Documentation

◆ begin_

OpIndex v8::internal::compiler::turboshaft::Block::begin_ = OpIndex::Invalid()
private

Definition at line 543 of file graph.h.

◆ custom_data_

uint32_t v8::internal::compiler::turboshaft::Block::custom_data_ = 0
private

Definition at line 555 of file graph.h.

◆ end_

OpIndex v8::internal::compiler::turboshaft::Block::end_ = OpIndex::Invalid()
private

Definition at line 544 of file graph.h.

◆ index_

BlockIndex v8::internal::compiler::turboshaft::Block::index_ = BlockIndex::Invalid()
private

Definition at line 545 of file graph.h.

◆ kind_

Kind v8::internal::compiler::turboshaft::Block::kind_
private

Definition at line 542 of file graph.h.

◆ kInvalidPredecessorIndex

int v8::internal::compiler::turboshaft::Block::kInvalidPredecessorIndex = -1
staticconstexpr

Definition at line 364 of file graph.h.

◆ last_predecessor_

Block* v8::internal::compiler::turboshaft::Block::last_predecessor_ = nullptr
private

Definition at line 546 of file graph.h.

◆ neighboring_predecessor_

Block* v8::internal::compiler::turboshaft::Block::neighboring_predecessor_ = nullptr
private

Definition at line 547 of file graph.h.

◆ origin_

const Block* v8::internal::compiler::turboshaft::Block::origin_ = nullptr
private

Definition at line 550 of file graph.h.

◆ predecessor_count_

uint32_t v8::internal::compiler::turboshaft::Block::predecessor_count_ = 0
private

Definition at line 549 of file graph.h.

◆ single_loop_predecessor_

Block* v8::internal::compiler::turboshaft::Block::single_loop_predecessor_ = nullptr
private

Definition at line 548 of file graph.h.


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