Skip to content

Commit 8390dab

Browse files
nico-hartmannV8 LUCI CQ
authored andcommitted
[build] Add Turboshaft sources to fast_mksnapshot
Bug: 342692713 Change-Id: I03fccd012a8a7315b3f44979810b04d373e8e6bf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5893179 Auto-Submit: Nico Hartmann <[email protected]> Commit-Queue: Jakob Kummerow <[email protected]> Reviewed-by: Jakob Kummerow <[email protected]> Cr-Commit-Position: refs/heads/main@{#96331}
1 parent f92216d commit 8390dab

96 files changed

Lines changed: 242 additions & 274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD.bazel

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,16 +3162,12 @@ filegroup(
31623162
"src/compiler/frame-states.h",
31633163
"src/compiler/functional-list.h",
31643164
"src/compiler/globals.h",
3165-
"src/compiler/graph.cc",
3166-
"src/compiler/graph.h",
31673165
"src/compiler/graph-assembler.cc",
31683166
"src/compiler/graph-assembler.h",
31693167
"src/compiler/graph-reducer.cc",
31703168
"src/compiler/graph-reducer.h",
31713169
"src/compiler/graph-trimmer.cc",
31723170
"src/compiler/graph-trimmer.h",
3173-
"src/compiler/graph-visualizer.cc",
3174-
"src/compiler/graph-visualizer.h",
31753171
"src/compiler/graph-zone-traits.h",
31763172
"src/compiler/heap-refs.cc",
31773173
"src/compiler/heap-refs.h",
@@ -3295,6 +3291,14 @@ filegroup(
32953291
"src/compiler/string-builder-optimizer.h",
32963292
"src/compiler/turbofan.h",
32973293
"src/compiler/turbofan-enabled.cc",
3294+
"src/compiler/turbofan-graph.cc",
3295+
"src/compiler/turbofan-graph.h",
3296+
"src/compiler/turbofan-graph-visualizer.cc",
3297+
"src/compiler/turbofan-graph-visualizer.h",
3298+
"src/compiler/turbofan-typer.cc",
3299+
"src/compiler/turbofan-typer.h",
3300+
"src/compiler/turbofan-types.cc",
3301+
"src/compiler/turbofan-types.h",
32983302
"src/compiler/turboshaft/access-builder.h",
32993303
"src/compiler/turboshaft/analyzer-iterator.cc",
33003304
"src/compiler/turboshaft/analyzer-iterator.h",
@@ -3433,10 +3437,6 @@ filegroup(
34333437
"src/compiler/type-narrowing-reducer.h",
34343438
"src/compiler/typed-optimization.cc",
34353439
"src/compiler/typed-optimization.h",
3436-
"src/compiler/typer.cc",
3437-
"src/compiler/typer.h",
3438-
"src/compiler/types.cc",
3439-
"src/compiler/types.h",
34403440
"src/compiler/use-info.h",
34413441
"src/compiler/value-numbering-reducer.cc",
34423442
"src/compiler/value-numbering-reducer.h",

BUILD.gn

Lines changed: 63 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -3496,9 +3496,7 @@ v8_header_set("v8_internal_headers") {
34963496
"src/compiler/graph-assembler.h",
34973497
"src/compiler/graph-reducer.h",
34983498
"src/compiler/graph-trimmer.h",
3499-
"src/compiler/graph-visualizer.h",
35003499
"src/compiler/graph-zone-traits.h",
3501-
"src/compiler/graph.h",
35023500
"src/compiler/heap-refs.h",
35033501
"src/compiler/js-call-reducer.h",
35043502
"src/compiler/js-context-specialization.h",
@@ -3563,6 +3561,10 @@ v8_header_set("v8_internal_headers") {
35633561
"src/compiler/simplified-operator.h",
35643562
"src/compiler/state-values-utils.h",
35653563
"src/compiler/string-builder-optimizer.h",
3564+
"src/compiler/turbofan-graph-visualizer.h",
3565+
"src/compiler/turbofan-graph.h",
3566+
"src/compiler/turbofan-typer.h",
3567+
"src/compiler/turbofan-types.h",
35663568
"src/compiler/turbofan.h",
35673569
"src/compiler/turboshaft/access-builder.h",
35683570
"src/compiler/turboshaft/analyzer-iterator.h",
@@ -3655,8 +3657,6 @@ v8_header_set("v8_internal_headers") {
36553657
"src/compiler/type-cache.h",
36563658
"src/compiler/type-narrowing-reducer.h",
36573659
"src/compiler/typed-optimization.h",
3658-
"src/compiler/typer.h",
3659-
"src/compiler/types.h",
36603660
"src/compiler/use-info.h",
36613661
"src/compiler/value-numbering-reducer.h",
36623662
"src/compiler/verifier.h",
@@ -5014,8 +5014,6 @@ v8_compiler_sources = [
50145014
"src/compiler/graph-assembler.cc",
50155015
"src/compiler/graph-reducer.cc",
50165016
"src/compiler/graph-trimmer.cc",
5017-
"src/compiler/graph-visualizer.cc",
5018-
"src/compiler/graph.cc",
50195017
"src/compiler/heap-refs.cc",
50205018
"src/compiler/js-call-reducer.cc",
50215019
"src/compiler/js-context-specialization.cc",
@@ -5073,16 +5071,73 @@ v8_compiler_sources = [
50735071
"src/compiler/state-values-utils.cc",
50745072
"src/compiler/string-builder-optimizer.cc",
50755073
"src/compiler/turbofan-enabled.cc",
5074+
"src/compiler/turbofan-graph-visualizer.cc",
5075+
"src/compiler/turbofan-graph.cc",
5076+
"src/compiler/turbofan-typer.cc",
5077+
"src/compiler/turbofan-types.cc",
5078+
"src/compiler/turboshaft/analyzer-iterator.cc",
5079+
"src/compiler/turboshaft/assembler.cc",
5080+
"src/compiler/turboshaft/block-instrumentation-phase.cc",
5081+
"src/compiler/turboshaft/block-instrumentation-reducer.cc",
5082+
"src/compiler/turboshaft/build-graph-phase.cc",
5083+
"src/compiler/turboshaft/code-elimination-and-simplification-phase.cc",
5084+
"src/compiler/turboshaft/copying-phase.cc",
5085+
"src/compiler/turboshaft/csa-optimize-phase.cc",
5086+
"src/compiler/turboshaft/debug-feature-lowering-phase.cc",
5087+
"src/compiler/turboshaft/decompression-optimization-phase.cc",
5088+
"src/compiler/turboshaft/decompression-optimization.cc",
5089+
"src/compiler/turboshaft/graph-builder.cc",
5090+
"src/compiler/turboshaft/graph-visualizer.cc",
5091+
"src/compiler/turboshaft/graph.cc",
5092+
"src/compiler/turboshaft/instruction-selection-phase.cc",
5093+
"src/compiler/turboshaft/late-escape-analysis-reducer.cc",
5094+
"src/compiler/turboshaft/late-load-elimination-reducer.cc",
5095+
"src/compiler/turboshaft/loop-finder.cc",
5096+
"src/compiler/turboshaft/loop-peeling-phase.cc",
5097+
"src/compiler/turboshaft/loop-unrolling-phase.cc",
5098+
"src/compiler/turboshaft/loop-unrolling-reducer.cc",
5099+
"src/compiler/turboshaft/machine-lowering-phase.cc",
5100+
"src/compiler/turboshaft/maglev-graph-building-phase.cc",
5101+
"src/compiler/turboshaft/memory-optimization-reducer.cc",
5102+
"src/compiler/turboshaft/operations.cc",
5103+
"src/compiler/turboshaft/optimize-phase.cc",
5104+
"src/compiler/turboshaft/phase.cc",
5105+
"src/compiler/turboshaft/pipelines.cc",
5106+
"src/compiler/turboshaft/pretenuring-propagation-reducer.cc",
5107+
"src/compiler/turboshaft/recreate-schedule-phase.cc",
5108+
"src/compiler/turboshaft/recreate-schedule.cc",
5109+
"src/compiler/turboshaft/representations.cc",
5110+
"src/compiler/turboshaft/sidetable.cc",
5111+
"src/compiler/turboshaft/simplify-tf-loops.cc",
5112+
"src/compiler/turboshaft/store-store-elimination-phase.cc",
5113+
"src/compiler/turboshaft/type-assertions-phase.cc",
5114+
"src/compiler/turboshaft/type-parser.cc",
5115+
"src/compiler/turboshaft/typed-optimizations-phase.cc",
5116+
"src/compiler/turboshaft/typer.cc",
5117+
"src/compiler/turboshaft/types.cc",
5118+
"src/compiler/turboshaft/use-map.cc",
5119+
"src/compiler/turboshaft/utils.cc",
50765120
"src/compiler/type-cache.cc",
50775121
"src/compiler/type-narrowing-reducer.cc",
50785122
"src/compiler/typed-optimization.cc",
5079-
"src/compiler/typer.cc",
5080-
"src/compiler/types.cc",
50815123
"src/compiler/value-numbering-reducer.cc",
50825124
"src/compiler/verifier.cc",
50835125
"src/compiler/zone-stats.cc",
50845126
]
50855127

5128+
if (!v8_enable_maglev) {
5129+
# When Maglev is not enabled, Turboshaft still needs Maglev's graph builder.
5130+
v8_compiler_sources += [
5131+
"src/maglev/maglev-compilation-info.cc",
5132+
"src/maglev/maglev-compilation-unit.cc",
5133+
"src/maglev/maglev-graph-builder.cc",
5134+
"src/maglev/maglev-graph-printer.cc",
5135+
"src/maglev/maglev-interpreter-frame-state.cc",
5136+
"src/maglev/maglev-ir.cc",
5137+
"src/maglev/maglev-phi-representation-selector.cc",
5138+
]
5139+
}
5140+
50865141
if (v8_current_cpu == "x86") {
50875142
v8_compiler_sources += [
50885143
### gcmole(ia32) ###
@@ -5262,85 +5317,6 @@ v8_source_set("v8_compiler") {
52625317
configs = [ ":internal_config" ]
52635318
}
52645319

5265-
# The src/compiler files with default optimization behavior.
5266-
v8_source_set("v8_turboshaft") {
5267-
visibility = [ ":*" ] # Only targets in this file can depend on this.
5268-
5269-
sources = [
5270-
"src/compiler/turboshaft/analyzer-iterator.cc",
5271-
"src/compiler/turboshaft/assembler.cc",
5272-
"src/compiler/turboshaft/block-instrumentation-phase.cc",
5273-
"src/compiler/turboshaft/block-instrumentation-reducer.cc",
5274-
"src/compiler/turboshaft/build-graph-phase.cc",
5275-
"src/compiler/turboshaft/code-elimination-and-simplification-phase.cc",
5276-
"src/compiler/turboshaft/copying-phase.cc",
5277-
"src/compiler/turboshaft/csa-optimize-phase.cc",
5278-
"src/compiler/turboshaft/debug-feature-lowering-phase.cc",
5279-
"src/compiler/turboshaft/decompression-optimization-phase.cc",
5280-
"src/compiler/turboshaft/decompression-optimization.cc",
5281-
"src/compiler/turboshaft/graph-builder.cc",
5282-
"src/compiler/turboshaft/graph-visualizer.cc",
5283-
"src/compiler/turboshaft/graph.cc",
5284-
"src/compiler/turboshaft/instruction-selection-phase.cc",
5285-
"src/compiler/turboshaft/late-escape-analysis-reducer.cc",
5286-
"src/compiler/turboshaft/late-load-elimination-reducer.cc",
5287-
"src/compiler/turboshaft/loop-finder.cc",
5288-
"src/compiler/turboshaft/loop-peeling-phase.cc",
5289-
"src/compiler/turboshaft/loop-unrolling-phase.cc",
5290-
"src/compiler/turboshaft/loop-unrolling-reducer.cc",
5291-
"src/compiler/turboshaft/machine-lowering-phase.cc",
5292-
"src/compiler/turboshaft/maglev-graph-building-phase.cc",
5293-
"src/compiler/turboshaft/memory-optimization-reducer.cc",
5294-
"src/compiler/turboshaft/operations.cc",
5295-
"src/compiler/turboshaft/optimize-phase.cc",
5296-
"src/compiler/turboshaft/phase.cc",
5297-
"src/compiler/turboshaft/pipelines.cc",
5298-
"src/compiler/turboshaft/pretenuring-propagation-reducer.cc",
5299-
"src/compiler/turboshaft/recreate-schedule-phase.cc",
5300-
"src/compiler/turboshaft/recreate-schedule.cc",
5301-
"src/compiler/turboshaft/representations.cc",
5302-
"src/compiler/turboshaft/sidetable.cc",
5303-
"src/compiler/turboshaft/simplify-tf-loops.cc",
5304-
"src/compiler/turboshaft/store-store-elimination-phase.cc",
5305-
"src/compiler/turboshaft/type-assertions-phase.cc",
5306-
"src/compiler/turboshaft/type-parser.cc",
5307-
"src/compiler/turboshaft/typed-optimizations-phase.cc",
5308-
"src/compiler/turboshaft/typer.cc",
5309-
"src/compiler/turboshaft/types.cc",
5310-
"src/compiler/turboshaft/use-map.cc",
5311-
"src/compiler/turboshaft/utils.cc",
5312-
]
5313-
5314-
if (!v8_enable_maglev) {
5315-
# When Maglev is not enabled, Turboshaft still needs Maglev's graph builder.
5316-
sources += [
5317-
"src/maglev/maglev-compilation-info.cc",
5318-
"src/maglev/maglev-compilation-unit.cc",
5319-
"src/maglev/maglev-graph-builder.cc",
5320-
"src/maglev/maglev-graph-printer.cc",
5321-
"src/maglev/maglev-interpreter-frame-state.cc",
5322-
"src/maglev/maglev-ir.cc",
5323-
"src/maglev/maglev-phi-representation-selector.cc",
5324-
]
5325-
}
5326-
5327-
public_deps = [
5328-
":generate_bytecode_builtins_list",
5329-
":run_torque",
5330-
":v8_internal_headers",
5331-
":v8_maybe_icu",
5332-
":v8_tracing",
5333-
]
5334-
5335-
deps = [
5336-
":v8_base_without_compiler",
5337-
":v8_libbase",
5338-
":v8_shared_internal_headers",
5339-
]
5340-
5341-
configs = [ ":internal_config" ]
5342-
}
5343-
53445320
group("v8_compiler_for_mksnapshot") {
53455321
if ((is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) ||
53465322
!v8_enable_turbofan) {
@@ -6374,10 +6350,6 @@ group("v8_base") {
63746350
":v8_base_without_compiler",
63756351
":v8_compiler",
63766352
]
6377-
6378-
if (v8_enable_turbofan) {
6379-
public_deps += [ ":v8_turboshaft" ]
6380-
}
63816353
}
63826354

63836355
v8_source_set("torque_base") {
@@ -7364,7 +7336,6 @@ if (current_toolchain == v8_snapshot_toolchain) {
73647336
":v8_maybe_icu",
73657337
":v8_shared_internal_headers",
73667338
":v8_tracing",
7367-
":v8_turboshaft",
73687339
"//build/win:default_exe_manifest",
73697340
]
73707341
}

src/compiler/access-info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <optional>
99

1010
#include "src/compiler/heap-refs.h"
11-
#include "src/compiler/types.h"
11+
#include "src/compiler/turbofan-types.h"
1212
#include "src/zone/zone-containers.h"
1313

1414
namespace v8 {

src/compiler/all-nodes.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "src/compiler/all-nodes.h"
66

7-
#include "src/compiler/graph.h"
7+
#include "src/compiler/turbofan-graph.h"
88

99
namespace v8 {
1010
namespace internal {

src/compiler/backend/bitcast-elider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "src/compiler/backend/bitcast-elider.h"
66

7-
#include "src/compiler/graph.h"
7+
#include "src/compiler/turbofan-graph.h"
88

99
namespace v8 {
1010
namespace internal {

src/compiler/backend/instruction-selector.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include "src/compiler/common-operator.h"
1818
#include "src/compiler/compiler-source-position-table.h"
1919
#include "src/compiler/globals.h"
20-
#include "src/compiler/graph.h"
2120
#include "src/compiler/js-heap-broker.h"
2221
#include "src/compiler/node-properties.h"
2322
#include "src/compiler/schedule.h"
2423
#include "src/compiler/state-values-utils.h"
24+
#include "src/compiler/turbofan-graph.h"
2525
#include "src/compiler/turboshaft/operations.h"
2626
#include "src/compiler/turboshaft/opmasks.h"
2727
#include "src/compiler/turboshaft/representations.h"

src/compiler/backend/instruction.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#include "src/compiler/backend/instruction-codes.h"
1717
#include "src/compiler/common-operator.h"
1818
#include "src/compiler/frame-states.h"
19-
#include "src/compiler/graph.h"
2019
#include "src/compiler/node.h"
2120
#include "src/compiler/schedule.h"
21+
#include "src/compiler/turbofan-graph.h"
2222
#include "src/compiler/turboshaft/graph.h"
2323
#include "src/compiler/turboshaft/loop-finder.h"
2424
#include "src/compiler/turboshaft/operations.h"

src/compiler/basic-block-instrumentor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
#include "src/codegen/optimized-compilation-info.h"
1010
#include "src/compiler/common-operator.h"
11-
#include "src/compiler/graph.h"
1211
#include "src/compiler/linkage.h"
1312
#include "src/compiler/machine-operator.h"
1413
#include "src/compiler/node.h"
1514
#include "src/compiler/operator-properties.h"
1615
#include "src/compiler/schedule.h"
16+
#include "src/compiler/turbofan-graph.h"
1717
#include "src/compiler/turboshaft/graph.h"
1818
#include "src/compiler/turboshaft/operation-matcher.h"
1919
#include "src/compiler/turboshaft/operations.h"

src/compiler/branch-condition-duplicator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
#include "src/compiler/branch-condition-duplicator.h"
66

7-
#include "src/compiler/graph.h"
87
#include "src/compiler/node-properties.h"
98
#include "src/compiler/opcodes.h"
9+
#include "src/compiler/turbofan-graph.h"
1010

1111
namespace v8 {
1212
namespace internal {

src/compiler/code-assembler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#include "src/codegen/machine-type.h"
1313
#include "src/codegen/tnode.h"
1414
#include "src/compiler/backend/instruction-selector.h"
15-
#include "src/compiler/graph.h"
1615
#include "src/compiler/js-graph.h"
1716
#include "src/compiler/linkage.h"
1817
#include "src/compiler/node-matchers.h"
1918
#include "src/compiler/pipeline.h"
2019
#include "src/compiler/raw-machine-assembler.h"
2120
#include "src/compiler/schedule.h"
21+
#include "src/compiler/turbofan-graph.h"
2222
#include "src/handles/handles-inl.h"
2323
#include "src/heap/factory-inl.h"
2424
#include "src/numbers/conversions-inl.h"

0 commit comments

Comments
 (0)