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

#include <js-inlining-heuristic.h>

Inheritance diagram for v8::internal::compiler::JSInliningHeuristic:
Collaboration diagram for v8::internal::compiler::JSInliningHeuristic:

Classes

struct  Candidate
 
struct  CandidateCompare
 

Public Types

enum  Mode { kJSOnly , kWasmWrappersOnly , kWasmFullInlining }
 

Public Member Functions

 JSInliningHeuristic (Editor *editor, Zone *local_zone, OptimizedCompilationInfo *info, JSGraph *jsgraph, JSHeapBroker *broker, SourcePositionTable *source_positions, NodeOriginTable *node_origins, Mode mode, const wasm::WasmModule *wasm_module, JsWasmCallsSidetable *js_wasm_calls_sidetable)
 
const char * reducer_name () const override
 
Reduction Reduce (Node *node) final
 
void Finalize () final
 
int total_inlined_bytecode_size () const
 
- Public Member Functions inherited from v8::internal::compiler::AdvancedReducer
 AdvancedReducer (Editor *editor)
 
- Public Member Functions inherited from v8::internal::compiler::Reducer
virtual ~Reducer ()=default
 
Reduction Reduce (Node *node, ObserveNodeManager *observe_node_manager)
 

Private Types

enum  StateCloneMode { kCloneState , kChangeInPlace }
 
using Candidates = ZoneSet<Candidate, CandidateCompare>
 

Private Member Functions

void PrintCandidates ()
 
Reduction InlineCandidate (Candidate const &candidate, bool small_function)
 
void CreateOrReuseDispatch (Node *node, Node *callee, Candidate const &candidate, Node **if_successes, Node **calls, Node **inputs, int input_count, int *num_calls)
 
bool TryReuseDispatch (Node *node, Node *callee, Node **if_successes, Node **calls, Node **inputs, int input_count, int *num_calls)
 
FrameState DuplicateFrameStateAndRename (FrameState frame_state, Node *from, Node *to, StateCloneMode mode)
 
NodeDuplicateStateValuesAndRename (Node *state_values, Node *from, Node *to, StateCloneMode mode)
 
Candidate CollectFunctions (Node *node, int functions_size)
 
CommonOperatorBuildercommon () const
 
TFGraphgraph () const
 
JSGraphjsgraph () const
 
JSHeapBrokerbroker () const
 
CompilationDependenciesdependencies () const
 
Isolateisolate () const
 
SimplifiedOperatorBuildersimplified () const
 
Mode mode () const
 

Private Attributes

JSInliner inliner_
 
Candidates candidates_
 
ZoneSet< NodeIdseen_
 
SourcePositionTablesource_positions_
 
JSGraph *const jsgraph_
 
JSHeapBroker *const broker_
 
OptimizedCompilationInfoinfo_
 
int total_inlined_bytecode_size_ = 0
 
const Mode mode_
 
const int max_inlined_bytecode_size_cumulative_
 
const int max_inlined_bytecode_size_absolute_
 

Static Private Attributes

static const int kMaxCallPolymorphism = 4
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::compiler::Reducer
static Reduction NoChange ()
 
static Reduction Replace (Node *node)
 
static Reduction Changed (Node *node)
 
- Protected Member Functions inherited from v8::internal::compiler::AdvancedReducer
void Replace (Node *node, Node *replacement)
 
void Replace (Node *node, Node *replacement, NodeId max_id)
 
void Revisit (Node *node)
 
void ReplaceWithValue (Node *node, Node *value, Node *effect=nullptr, Node *control=nullptr)
 
void RelaxEffectsAndControls (Node *node)
 
void RelaxControls (Node *node, Node *control=nullptr)
 
void MergeControlToEnd (TFGraph *graph, CommonOperatorBuilder *common, Node *node)
 
- Static Protected Member Functions inherited from v8::internal::compiler::AdvancedReducer
static Reduction Replace (Node *node)
 

Detailed Description

Definition at line 14 of file js-inlining-heuristic.h.

Member Typedef Documentation

◆ Candidates

Member Enumeration Documentation

◆ Mode

Enumerator
kJSOnly 
kWasmWrappersOnly 
kWasmFullInlining 

Definition at line 16 of file js-inlining-heuristic.h.

◆ StateCloneMode

Enumerator
kCloneState 
kChangeInPlace 

Definition at line 105 of file js-inlining-heuristic.h.

Constructor & Destructor Documentation

◆ JSInliningHeuristic()

v8::internal::compiler::JSInliningHeuristic::JSInliningHeuristic ( Editor * editor,
Zone * local_zone,
OptimizedCompilationInfo * info,
JSGraph * jsgraph,
JSHeapBroker * broker,
SourcePositionTable * source_positions,
NodeOriginTable * node_origins,
Mode mode,
const wasm::WasmModule * wasm_module,
JsWasmCallsSidetable * js_wasm_calls_sidetable )
inline

Definition at line 23 of file js-inlining-heuristic.h.

Member Function Documentation

◆ broker()

JSHeapBroker * v8::internal::compiler::JSInliningHeuristic::broker ( ) const
inlineprivate

Definition at line 116 of file js-inlining-heuristic.h.

Here is the caller graph for this function:

◆ CollectFunctions()

JSInliningHeuristic::Candidate v8::internal::compiler::JSInliningHeuristic::CollectFunctions ( Node * node,
int functions_size )
private

Definition at line 88 of file js-inlining-heuristic.cc.

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

◆ common()

CommonOperatorBuilder * v8::internal::compiler::JSInliningHeuristic::common ( ) const
private

Definition at line 864 of file js-inlining-heuristic.cc.

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

◆ CreateOrReuseDispatch()

void v8::internal::compiler::JSInliningHeuristic::CreateOrReuseDispatch ( Node * node,
Node * callee,
Candidate const & candidate,
Node ** if_successes,
Node ** calls,
Node ** inputs,
int input_count,
int * num_calls )
private

Definition at line 652 of file js-inlining-heuristic.cc.

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

◆ dependencies()

CompilationDependencies * v8::internal::compiler::JSInliningHeuristic::dependencies ( ) const
private

Definition at line 860 of file js-inlining-heuristic.cc.

Here is the call graph for this function:

◆ DuplicateFrameStateAndRename()

FrameState v8::internal::compiler::JSInliningHeuristic::DuplicateFrameStateAndRename ( FrameState frame_state,
Node * from,
Node * to,
StateCloneMode mode )
private

Definition at line 391 of file js-inlining-heuristic.cc.

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

◆ DuplicateStateValuesAndRename()

Node * v8::internal::compiler::JSInliningHeuristic::DuplicateStateValuesAndRename ( Node * state_values,
Node * from,
Node * to,
StateCloneMode mode )
private

Definition at line 343 of file js-inlining-heuristic.cc.

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

◆ Finalize()

void v8::internal::compiler::JSInliningHeuristic::Finalize ( )
finalvirtual

Reimplemented from v8::internal::compiler::Reducer.

Definition at line 279 of file js-inlining-heuristic.cc.

Here is the call graph for this function:

◆ graph()

TFGraph * v8::internal::compiler::JSInliningHeuristic::graph ( ) const
private

Definition at line 858 of file js-inlining-heuristic.cc.

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

◆ InlineCandidate()

Reduction v8::internal::compiler::JSInliningHeuristic::InlineCandidate ( Candidate const & candidate,
bool small_function )
private

Definition at line 704 of file js-inlining-heuristic.cc.

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

◆ isolate()

Isolate * v8::internal::compiler::JSInliningHeuristic::isolate ( ) const
inlineprivate

Definition at line 118 of file js-inlining-heuristic.h.

Here is the call graph for this function:

◆ jsgraph()

JSGraph * v8::internal::compiler::JSInliningHeuristic::jsgraph ( ) const
inlineprivate

Definition at line 114 of file js-inlining-heuristic.h.

Here is the caller graph for this function:

◆ mode()

Mode v8::internal::compiler::JSInliningHeuristic::mode ( ) const
inlineprivate

Definition at line 120 of file js-inlining-heuristic.h.

Here is the caller graph for this function:

◆ PrintCandidates()

void v8::internal::compiler::JSInliningHeuristic::PrintCandidates ( )
private

Definition at line 826 of file js-inlining-heuristic.cc.

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

◆ Reduce()

Reduction v8::internal::compiler::JSInliningHeuristic::Reduce ( Node * node)
finalvirtual

Implements v8::internal::compiler::Reducer.

Definition at line 153 of file js-inlining-heuristic.cc.

Here is the call graph for this function:

◆ reducer_name()

const char * v8::internal::compiler::JSInliningHeuristic::reducer_name ( ) const
inlineoverridevirtual

Implements v8::internal::compiler::Reducer.

Definition at line 51 of file js-inlining-heuristic.h.

◆ simplified()

SimplifiedOperatorBuilder * v8::internal::compiler::JSInliningHeuristic::simplified ( ) const
private

Definition at line 868 of file js-inlining-heuristic.cc.

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

◆ total_inlined_bytecode_size()

int v8::internal::compiler::JSInliningHeuristic::total_inlined_bytecode_size ( ) const
inline

Definition at line 59 of file js-inlining-heuristic.h.

◆ TryReuseDispatch()

bool v8::internal::compiler::JSInliningHeuristic::TryReuseDispatch ( Node * node,
Node * callee,
Node ** if_successes,
Node ** calls,
Node ** inputs,
int input_count,
int * num_calls )
private

Definition at line 415 of file js-inlining-heuristic.cc.

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

Member Data Documentation

◆ broker_

JSHeapBroker* const v8::internal::compiler::JSInliningHeuristic::broker_
private

Definition at line 127 of file js-inlining-heuristic.h.

◆ candidates_

Candidates v8::internal::compiler::JSInliningHeuristic::candidates_
private

Definition at line 123 of file js-inlining-heuristic.h.

◆ info_

OptimizedCompilationInfo* v8::internal::compiler::JSInliningHeuristic::info_
private

Definition at line 128 of file js-inlining-heuristic.h.

◆ inliner_

JSInliner v8::internal::compiler::JSInliningHeuristic::inliner_
private

Definition at line 122 of file js-inlining-heuristic.h.

◆ jsgraph_

JSGraph* const v8::internal::compiler::JSInliningHeuristic::jsgraph_
private

Definition at line 126 of file js-inlining-heuristic.h.

◆ kMaxCallPolymorphism

const int v8::internal::compiler::JSInliningHeuristic::kMaxCallPolymorphism = 4
staticprivate

Definition at line 66 of file js-inlining-heuristic.h.

◆ max_inlined_bytecode_size_absolute_

const int v8::internal::compiler::JSInliningHeuristic::max_inlined_bytecode_size_absolute_
private

Definition at line 132 of file js-inlining-heuristic.h.

◆ max_inlined_bytecode_size_cumulative_

const int v8::internal::compiler::JSInliningHeuristic::max_inlined_bytecode_size_cumulative_
private

Definition at line 131 of file js-inlining-heuristic.h.

◆ mode_

const Mode v8::internal::compiler::JSInliningHeuristic::mode_
private

Definition at line 130 of file js-inlining-heuristic.h.

◆ seen_

ZoneSet<NodeId> v8::internal::compiler::JSInliningHeuristic::seen_
private

Definition at line 124 of file js-inlining-heuristic.h.

◆ source_positions_

SourcePositionTable* v8::internal::compiler::JSInliningHeuristic::source_positions_
private

Definition at line 125 of file js-inlining-heuristic.h.

◆ total_inlined_bytecode_size_

int v8::internal::compiler::JSInliningHeuristic::total_inlined_bytecode_size_ = 0
private

Definition at line 129 of file js-inlining-heuristic.h.


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