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/greedy-allocator.h" | 24 #include "src/compiler/greedy-allocator.h" |
25 #include "src/compiler/instruction.h" | 25 #include "src/compiler/instruction.h" |
26 #include "src/compiler/instruction-selector.h" | 26 #include "src/compiler/instruction-selector.h" |
27 #include "src/compiler/js-builtin-reducer.h" | 27 #include "src/compiler/js-builtin-reducer.h" |
28 #include "src/compiler/js-context-specialization.h" | 28 #include "src/compiler/js-context-specialization.h" |
29 #include "src/compiler/js-frame-specialization.h" | 29 #include "src/compiler/js-frame-specialization.h" |
30 #include "src/compiler/js-generic-lowering.h" | 30 #include "src/compiler/js-generic-lowering.h" |
31 #include "src/compiler/js-inlining.h" | 31 #include "src/compiler/js-inlining.h" |
32 #include "src/compiler/js-intrinsic-lowering.h" | 32 #include "src/compiler/js-intrinsic-lowering.h" |
33 #include "src/compiler/js-type-feedback.h" | 33 #include "src/compiler/js-type-feedback.h" |
| 34 #include "src/compiler/js-type-feedback-lowering.h" |
34 #include "src/compiler/js-typed-lowering.h" | 35 #include "src/compiler/js-typed-lowering.h" |
35 #include "src/compiler/jump-threading.h" | 36 #include "src/compiler/jump-threading.h" |
36 #include "src/compiler/load-elimination.h" | 37 #include "src/compiler/load-elimination.h" |
37 #include "src/compiler/loop-analysis.h" | 38 #include "src/compiler/loop-analysis.h" |
38 #include "src/compiler/loop-peeling.h" | 39 #include "src/compiler/loop-peeling.h" |
39 #include "src/compiler/machine-operator-reducer.h" | 40 #include "src/compiler/machine-operator-reducer.h" |
40 #include "src/compiler/move-optimizer.h" | 41 #include "src/compiler/move-optimizer.h" |
41 #include "src/compiler/osr.h" | 42 #include "src/compiler/osr.h" |
42 #include "src/compiler/pipeline-statistics.h" | 43 #include "src/compiler/pipeline-statistics.h" |
43 #include "src/compiler/register-allocator.h" | 44 #include "src/compiler/register-allocator.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 struct TypedLoweringPhase { | 571 struct TypedLoweringPhase { |
571 static const char* phase_name() { return "typed lowering"; } | 572 static const char* phase_name() { return "typed lowering"; } |
572 | 573 |
573 void Run(PipelineData* data, Zone* temp_zone) { | 574 void Run(PipelineData* data, Zone* temp_zone) { |
574 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 575 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
575 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 576 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
576 data->common()); | 577 data->common()); |
577 LoadElimination load_elimination(&graph_reducer); | 578 LoadElimination load_elimination(&graph_reducer); |
578 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); | 579 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); |
579 JSTypedLowering typed_lowering(&graph_reducer, data->jsgraph(), temp_zone); | 580 JSTypedLowering typed_lowering(&graph_reducer, data->jsgraph(), temp_zone); |
| 581 JSTypeFeedbackLowering type_feedback_lowering( |
| 582 &graph_reducer, data->info()->is_deoptimization_enabled() |
| 583 ? JSTypeFeedbackLowering::kDeoptimizationEnabled |
| 584 : JSTypeFeedbackLowering::kNoFlags, |
| 585 data->jsgraph()); |
580 JSIntrinsicLowering intrinsic_lowering( | 586 JSIntrinsicLowering intrinsic_lowering( |
581 &graph_reducer, data->jsgraph(), | 587 &graph_reducer, data->jsgraph(), |
582 data->info()->is_deoptimization_enabled() | 588 data->info()->is_deoptimization_enabled() |
583 ? JSIntrinsicLowering::kDeoptimizationEnabled | 589 ? JSIntrinsicLowering::kDeoptimizationEnabled |
584 : JSIntrinsicLowering::kDeoptimizationDisabled); | 590 : JSIntrinsicLowering::kDeoptimizationDisabled); |
585 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 591 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
586 data->common(), data->machine()); | 592 data->common(), data->machine()); |
587 AddReducer(data, &graph_reducer, &dead_code_elimination); | 593 AddReducer(data, &graph_reducer, &dead_code_elimination); |
588 AddReducer(data, &graph_reducer, &builtin_reducer); | 594 AddReducer(data, &graph_reducer, &builtin_reducer); |
589 AddReducer(data, &graph_reducer, &typed_lowering); | 595 AddReducer(data, &graph_reducer, &typed_lowering); |
590 AddReducer(data, &graph_reducer, &intrinsic_lowering); | 596 AddReducer(data, &graph_reducer, &intrinsic_lowering); |
| 597 AddReducer(data, &graph_reducer, &type_feedback_lowering); |
591 AddReducer(data, &graph_reducer, &load_elimination); | 598 AddReducer(data, &graph_reducer, &load_elimination); |
592 AddReducer(data, &graph_reducer, &common_reducer); | 599 AddReducer(data, &graph_reducer, &common_reducer); |
593 graph_reducer.ReduceGraph(); | 600 graph_reducer.ReduceGraph(); |
594 } | 601 } |
595 }; | 602 }; |
596 | 603 |
597 | 604 |
598 struct SimplifiedLoweringPhase { | 605 struct SimplifiedLoweringPhase { |
599 static const char* phase_name() { return "simplified lowering"; } | 606 static const char* phase_name() { return "simplified lowering"; } |
600 | 607 |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 tcf << AsC1VRegisterAllocationData("CodeGen", | 1357 tcf << AsC1VRegisterAllocationData("CodeGen", |
1351 data->register_allocation_data()); | 1358 data->register_allocation_data()); |
1352 } | 1359 } |
1353 | 1360 |
1354 data->DeleteRegisterAllocationZone(); | 1361 data->DeleteRegisterAllocationZone(); |
1355 } | 1362 } |
1356 | 1363 |
1357 } // namespace compiler | 1364 } // namespace compiler |
1358 } // namespace internal | 1365 } // namespace internal |
1359 } // namespace v8 | 1366 } // namespace v8 |
OLD | NEW |