OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "src/compiler/graph-trimmer.h" | 24 #include "src/compiler/graph-trimmer.h" |
25 #include "src/compiler/graph-visualizer.h" | 25 #include "src/compiler/graph-visualizer.h" |
26 #include "src/compiler/greedy-allocator.h" | 26 #include "src/compiler/greedy-allocator.h" |
27 #include "src/compiler/instruction.h" | 27 #include "src/compiler/instruction.h" |
28 #include "src/compiler/instruction-selector.h" | 28 #include "src/compiler/instruction-selector.h" |
29 #include "src/compiler/js-builtin-reducer.h" | 29 #include "src/compiler/js-builtin-reducer.h" |
30 #include "src/compiler/js-context-relaxation.h" | 30 #include "src/compiler/js-context-relaxation.h" |
31 #include "src/compiler/js-context-specialization.h" | 31 #include "src/compiler/js-context-specialization.h" |
32 #include "src/compiler/js-frame-specialization.h" | 32 #include "src/compiler/js-frame-specialization.h" |
33 #include "src/compiler/js-generic-lowering.h" | 33 #include "src/compiler/js-generic-lowering.h" |
34 #include "src/compiler/js-global-specialization.h" | |
35 #include "src/compiler/js-inlining-heuristic.h" | 34 #include "src/compiler/js-inlining-heuristic.h" |
36 #include "src/compiler/js-intrinsic-lowering.h" | 35 #include "src/compiler/js-intrinsic-lowering.h" |
| 36 #include "src/compiler/js-native-context-specialization.h" |
37 #include "src/compiler/js-type-feedback.h" | 37 #include "src/compiler/js-type-feedback.h" |
38 #include "src/compiler/js-type-feedback-lowering.h" | 38 #include "src/compiler/js-type-feedback-lowering.h" |
39 #include "src/compiler/js-typed-lowering.h" | 39 #include "src/compiler/js-typed-lowering.h" |
40 #include "src/compiler/jump-threading.h" | 40 #include "src/compiler/jump-threading.h" |
41 #include "src/compiler/live-range-separator.h" | 41 #include "src/compiler/live-range-separator.h" |
42 #include "src/compiler/load-elimination.h" | 42 #include "src/compiler/load-elimination.h" |
43 #include "src/compiler/loop-analysis.h" | 43 #include "src/compiler/loop-analysis.h" |
44 #include "src/compiler/loop-peeling.h" | 44 #include "src/compiler/loop-peeling.h" |
45 #include "src/compiler/machine-operator-reducer.h" | 45 #include "src/compiler/machine-operator-reducer.h" |
46 #include "src/compiler/move-optimizer.h" | 46 #include "src/compiler/move-optimizer.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 506 |
507 struct NativeContextSpecializationPhase { | 507 struct NativeContextSpecializationPhase { |
508 static const char* phase_name() { return "native context specialization"; } | 508 static const char* phase_name() { return "native context specialization"; } |
509 | 509 |
510 void Run(PipelineData* data, Zone* temp_zone) { | 510 void Run(PipelineData* data, Zone* temp_zone) { |
511 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 511 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
512 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 512 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
513 data->common()); | 513 data->common()); |
514 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 514 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
515 data->common(), data->machine()); | 515 data->common(), data->machine()); |
516 JSGlobalSpecialization global_specialization( | 516 JSNativeContextSpecialization native_context_specialization( |
517 &graph_reducer, data->jsgraph(), | 517 &graph_reducer, data->jsgraph(), |
518 data->info()->is_deoptimization_enabled() | 518 data->info()->is_deoptimization_enabled() |
519 ? JSGlobalSpecialization::kDeoptimizationEnabled | 519 ? JSNativeContextSpecialization::kDeoptimizationEnabled |
520 : JSGlobalSpecialization::kNoFlags, | 520 : JSNativeContextSpecialization::kNoFlags, |
521 handle(data->info()->global_object(), data->isolate()), | 521 handle(data->info()->global_object(), data->isolate()), |
522 data->info()->dependencies(), temp_zone); | 522 data->info()->dependencies(), temp_zone); |
523 AddReducer(data, &graph_reducer, &dead_code_elimination); | 523 AddReducer(data, &graph_reducer, &dead_code_elimination); |
524 AddReducer(data, &graph_reducer, &common_reducer); | 524 AddReducer(data, &graph_reducer, &common_reducer); |
525 AddReducer(data, &graph_reducer, &global_specialization); | 525 AddReducer(data, &graph_reducer, &native_context_specialization); |
526 graph_reducer.ReduceGraph(); | 526 graph_reducer.ReduceGraph(); |
527 } | 527 } |
528 }; | 528 }; |
529 | 529 |
530 | 530 |
531 struct InliningPhase { | 531 struct InliningPhase { |
532 static const char* phase_name() { return "inlining"; } | 532 static const char* phase_name() { return "inlining"; } |
533 | 533 |
534 void Run(PipelineData* data, Zone* temp_zone) { | 534 void Run(PipelineData* data, Zone* temp_zone) { |
535 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 535 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 tcf << AsC1VRegisterAllocationData("CodeGen", | 1471 tcf << AsC1VRegisterAllocationData("CodeGen", |
1472 data->register_allocation_data()); | 1472 data->register_allocation_data()); |
1473 } | 1473 } |
1474 | 1474 |
1475 data->DeleteRegisterAllocationZone(); | 1475 data->DeleteRegisterAllocationZone(); |
1476 } | 1476 } |
1477 | 1477 |
1478 } // namespace compiler | 1478 } // namespace compiler |
1479 } // namespace internal | 1479 } // namespace internal |
1480 } // namespace v8 | 1480 } // namespace v8 |
OLD | NEW |