![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include "src/compiler/turboshaft/graph-builder.h"
#include <limits>
#include <numeric>
#include <optional>
#include <string_view>
#include "src/base/container-utils.h"
#include "src/base/logging.h"
#include "src/base/numerics/safe_conversions.h"
#include "src/base/small-vector.h"
#include "src/base/vector.h"
#include "src/codegen/bailout-reason.h"
#include "src/codegen/machine-type.h"
#include "src/common/globals.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/compiler-source-position-table.h"
#include "src/compiler/fast-api-calls.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/node-aux-data.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-origin-table.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/schedule.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/state-values-utils.h"
#include "src/compiler/turboshaft/assembler.h"
#include "src/compiler/turboshaft/deopt-data.h"
#include "src/compiler/turboshaft/explicit-truncation-reducer.h"
#include "src/compiler/turboshaft/graph.h"
#include "src/compiler/turboshaft/operations.h"
#include "src/compiler/turboshaft/opmasks.h"
#include "src/compiler/turboshaft/phase.h"
#include "src/compiler/turboshaft/representations.h"
#include "src/compiler/turboshaft/variable-reducer.h"
#include "src/flags/flags.h"
#include "src/heap/factory-inl.h"
#include "src/objects/js-objects.h"
#include "src/objects/map.h"
#include "src/zone/zone-containers.h"
#include "src/compiler/turboshaft/define-assembler-macros.inc"
#include "src/compiler/turboshaft/undef-assembler-macros.inc"
Go to the source code of this file.
Namespaces | |
namespace | v8 |
namespace | v8::internal |
namespace | v8::internal::compiler |
namespace | v8::internal::compiler::turboshaft |
Macros | |
#define | V8_COMPILER_TURBOSHAFT_ASSEMBLER_MACROS_DEFINED 1 |
#define | TSA_DCHECK(assembler, condition) |
#define | TSA_SLOW_DCHECK(assembler, ...) |
#define | LIKELY(...) |
#define | UNLIKELY(...) |
#define | BIND(label, ...) |
#define | BIND_LOOP(loop_label, ...) |
#define | WHILE(...) |
#define | FOREACH_IMPL_2(arg, iterable) |
#define | FOREACH_IMPL_3(arg0, arg1, iterable) |
#define | FOREACH(...) |
#define | BREAK Asm().ControlFlowHelper_Goto(loop_exit_xx, {}) |
#define | CONTINUE Asm().ControlFlowHelper_Goto(loop_header_xx, {}) |
#define | GOTO(label, ...) |
#define | GOTO_IF(cond, label, ...) |
#define | GOTO_IF_NOT(cond, label, ...) |
#define | FORCE_UNROLL_LOOP |
#define | SUPPRESSED_DANGLING_ELSE_WARNING_IF(...) |
#define | SUPPRESSED_DANGLING_ELSE_WARNING_ELSE else |
#define | NO_SHADOW |
#define | RE_SHADOW _Pragma("GCC diagnostic pop") |
#define | IF(...) |
#define | IF_NOT(...) |
#define | ELSE |
#define | Assert(condition) |
#define | REDUCE(operation) |
#define | REDUCE_INPUT_GRAPH(operation) |
#define | __ Asm(). |
#define | BINOP_CASE(opcode, assembler_op) |
#define | UNARY_CASE(opcode, assembler_op) |
#define | OBJECT_IS_CASE(kind) |
#define | CHECK_OBJECT_IS_CASE(code, kind, input_assumptions, reason, feedback) |
#define | CONVERT_PRIMITIVE_TO_OBJECT_CASE(name, kind, input_type, input_interpretation) |
#define | CONVERT_PRIMITIVE_TO_OBJECT_OR_DEOPT_CASE(name, kind, input_type, input_interpretation) |
#define | CONVERT_OBJECT_TO_PRIMITIVE_CASE(name, kind, input_assumptions) |
#define | TRUNCATE_OBJECT_TO_PRIMITIVE_CASE(name, kind, input_assumptions) |
#define | CHANGE_OR_DEOPT_INT_CASE(kind) |
#define | CASE(mode) |
#define | BIGINT_BINOP_CASE(op, kind) |
#define | ELSE_UNREACHABLE |
#define | BINOP(binop, size) |
#define | ATOMIC_WORD32_PAIR_BINOP(kind) |
Functions | |
std::optional< BailoutReason > | v8::internal::compiler::turboshaft::BuildGraph (PipelineData *data, Schedule *schedule, Zone *phase_zone, Linkage *linkage, JsWasmCallsSidetable *js_wasm_calls_sidetable) |
#define __ Asm(). |
#define Assert | ( | condition | ) |
#define ATOMIC_WORD32_PAIR_BINOP | ( | kind | ) |
#define BIGINT_BINOP_CASE | ( | op, | |
kind ) |
#define BIND | ( | label, | |
... ) |
#define BIND_LOOP | ( | loop_label, | |
... ) |
#define BINOP | ( | binop, | |
size ) |
#define BINOP_CASE | ( | opcode, | |
assembler_op ) |
#define BREAK Asm().ControlFlowHelper_Goto(loop_exit_xx, {}) |
#define CASE | ( | mode | ) |
#define CHANGE_OR_DEOPT_INT_CASE | ( | kind | ) |
#define CHECK_OBJECT_IS_CASE | ( | code, | |
kind, | |||
input_assumptions, | |||
reason, | |||
feedback ) |
#define CONTINUE Asm().ControlFlowHelper_Goto(loop_header_xx, {}) |
#define CONVERT_OBJECT_TO_PRIMITIVE_CASE | ( | name, | |
kind, | |||
input_assumptions ) |
#define CONVERT_PRIMITIVE_TO_OBJECT_CASE | ( | name, | |
kind, | |||
input_type, | |||
input_interpretation ) |
#define CONVERT_PRIMITIVE_TO_OBJECT_OR_DEOPT_CASE | ( | name, | |
kind, | |||
input_type, | |||
input_interpretation ) |
#define ELSE |
#define ELSE_UNREACHABLE |
#define FORCE_UNROLL_LOOP |
#define FOREACH | ( | ... | ) |
#define FOREACH_IMPL_2 | ( | arg, | |
iterable ) |
#define FOREACH_IMPL_3 | ( | arg0, | |
arg1, | |||
iterable ) |
#define GOTO_IF | ( | cond, | |
label, | |||
... ) |
#define GOTO_IF_NOT | ( | cond, | |
label, | |||
... ) |
#define IF | ( | ... | ) |
#define IF_NOT | ( | ... | ) |
#define LIKELY | ( | ... | ) |
#define NO_SHADOW |
#define OBJECT_IS_CASE | ( | kind | ) |
#define RE_SHADOW _Pragma("GCC diagnostic pop") |
#define REDUCE | ( | operation | ) |
#define REDUCE_INPUT_GRAPH | ( | operation | ) |
#define SUPPRESSED_DANGLING_ELSE_WARNING_ELSE else |
#define SUPPRESSED_DANGLING_ELSE_WARNING_IF | ( | ... | ) |
#define TRUNCATE_OBJECT_TO_PRIMITIVE_CASE | ( | name, | |
kind, | |||
input_assumptions ) |
#define TSA_DCHECK | ( | assembler, | |
condition ) |
#define TSA_SLOW_DCHECK | ( | assembler, | |
... ) |
#define UNARY_CASE | ( | opcode, | |
assembler_op ) |
#define UNLIKELY | ( | ... | ) |
#define V8_COMPILER_TURBOSHAFT_ASSEMBLER_MACROS_DEFINED 1 |
#define WHILE | ( | ... | ) |
AssemblerT assembler |
Definition at line 71 of file graph-builder.cc.
Block* block |
Definition at line 92 of file graph-builder.cc.
ZoneVector<BlockData> block_mapping {schedule.RpoBlockCount(), phase_zone} |
Definition at line 96 of file graph-builder.cc.
JSHeapBroker* broker |
Definition at line 68 of file graph-builder.cc.
OpIndex final_frame_state |
Definition at line 93 of file graph-builder.cc.
Zone* graph_zone |
Definition at line 69 of file graph-builder.cc.
bool inside_region = false |
Definition at line 97 of file graph-builder.cc.
Isolate* isolate |
Definition at line 67 of file graph-builder.cc.
JsWasmCallsSidetable* js_wasm_calls_sidetable |
Definition at line 74 of file graph-builder.cc.
Linkage* linkage |
Definition at line 65 of file graph-builder.cc.
NodeAuxData<OpIndex> op_mapping {phase_zone} |
Definition at line 95 of file graph-builder.cc.
NodeOriginTable* origins |
Definition at line 73 of file graph-builder.cc.
Zone* phase_zone |
Definition at line 63 of file graph-builder.cc.
TurboshaftPipelineKind pipeline_kind |
Definition at line 75 of file graph-builder.cc.
Schedule& schedule |
Definition at line 64 of file graph-builder.cc.
SourcePositionTable* source_positions |
Definition at line 72 of file graph-builder.cc.