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 10 matching lines...) Expand all Loading... |
21 #include "src/compiler/control-flow-optimizer.h" | 21 #include "src/compiler/control-flow-optimizer.h" |
22 #include "src/compiler/dead-code-elimination.h" | 22 #include "src/compiler/dead-code-elimination.h" |
23 #include "src/compiler/frame-elider.h" | 23 #include "src/compiler/frame-elider.h" |
24 #include "src/compiler/graph-replay.h" | 24 #include "src/compiler/graph-replay.h" |
25 #include "src/compiler/graph-trimmer.h" | 25 #include "src/compiler/graph-trimmer.h" |
26 #include "src/compiler/graph-visualizer.h" | 26 #include "src/compiler/graph-visualizer.h" |
27 #include "src/compiler/greedy-allocator.h" | 27 #include "src/compiler/greedy-allocator.h" |
28 #include "src/compiler/instruction.h" | 28 #include "src/compiler/instruction.h" |
29 #include "src/compiler/instruction-selector.h" | 29 #include "src/compiler/instruction-selector.h" |
30 #include "src/compiler/js-builtin-reducer.h" | 30 #include "src/compiler/js-builtin-reducer.h" |
| 31 #include "src/compiler/js-call-reducer.h" |
31 #include "src/compiler/js-context-relaxation.h" | 32 #include "src/compiler/js-context-relaxation.h" |
32 #include "src/compiler/js-context-specialization.h" | 33 #include "src/compiler/js-context-specialization.h" |
33 #include "src/compiler/js-frame-specialization.h" | 34 #include "src/compiler/js-frame-specialization.h" |
34 #include "src/compiler/js-generic-lowering.h" | 35 #include "src/compiler/js-generic-lowering.h" |
35 #include "src/compiler/js-global-object-specialization.h" | 36 #include "src/compiler/js-global-object-specialization.h" |
36 #include "src/compiler/js-inlining-heuristic.h" | 37 #include "src/compiler/js-inlining-heuristic.h" |
37 #include "src/compiler/js-intrinsic-lowering.h" | 38 #include "src/compiler/js-intrinsic-lowering.h" |
38 #include "src/compiler/js-native-context-specialization.h" | 39 #include "src/compiler/js-native-context-specialization.h" |
39 #include "src/compiler/js-typed-lowering.h" | 40 #include "src/compiler/js-typed-lowering.h" |
40 #include "src/compiler/jump-threading.h" | 41 #include "src/compiler/jump-threading.h" |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 531 |
531 struct InliningPhase { | 532 struct InliningPhase { |
532 static const char* phase_name() { return "inlining"; } | 533 static const char* phase_name() { return "inlining"; } |
533 | 534 |
534 void Run(PipelineData* data, Zone* temp_zone) { | 535 void Run(PipelineData* data, Zone* temp_zone) { |
535 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 536 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
536 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 537 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
537 data->common()); | 538 data->common()); |
538 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 539 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
539 data->common(), data->machine()); | 540 data->common(), data->machine()); |
| 541 JSCallReducer call_reducer(data->jsgraph()); |
540 JSContextSpecialization context_specialization( | 542 JSContextSpecialization context_specialization( |
541 &graph_reducer, data->jsgraph(), | 543 &graph_reducer, data->jsgraph(), |
542 data->info()->is_function_context_specializing() | 544 data->info()->is_function_context_specializing() |
543 ? data->info()->context() | 545 ? data->info()->context() |
544 : MaybeHandle<Context>()); | 546 : MaybeHandle<Context>()); |
545 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), | 547 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
546 data->jsgraph()); | 548 data->jsgraph()); |
547 JSInliningHeuristic inlining(&graph_reducer, | 549 JSInliningHeuristic inlining(&graph_reducer, |
548 data->info()->is_inlining_enabled() | 550 data->info()->is_inlining_enabled() |
549 ? JSInliningHeuristic::kGeneralInlining | 551 ? JSInliningHeuristic::kGeneralInlining |
550 : JSInliningHeuristic::kRestrictedInlining, | 552 : JSInliningHeuristic::kRestrictedInlining, |
551 temp_zone, data->info(), data->jsgraph()); | 553 temp_zone, data->info(), data->jsgraph()); |
552 AddReducer(data, &graph_reducer, &dead_code_elimination); | 554 AddReducer(data, &graph_reducer, &dead_code_elimination); |
553 AddReducer(data, &graph_reducer, &common_reducer); | 555 AddReducer(data, &graph_reducer, &common_reducer); |
554 if (data->info()->is_frame_specializing()) { | 556 if (data->info()->is_frame_specializing()) { |
555 AddReducer(data, &graph_reducer, &frame_specialization); | 557 AddReducer(data, &graph_reducer, &frame_specialization); |
556 } | 558 } |
557 AddReducer(data, &graph_reducer, &context_specialization); | 559 AddReducer(data, &graph_reducer, &context_specialization); |
| 560 AddReducer(data, &graph_reducer, &call_reducer); |
558 AddReducer(data, &graph_reducer, &inlining); | 561 AddReducer(data, &graph_reducer, &inlining); |
559 graph_reducer.ReduceGraph(); | 562 graph_reducer.ReduceGraph(); |
560 } | 563 } |
561 }; | 564 }; |
562 | 565 |
563 | 566 |
564 struct TyperPhase { | 567 struct TyperPhase { |
565 static const char* phase_name() { return "typer"; } | 568 static const char* phase_name() { return "typer"; } |
566 | 569 |
567 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { | 570 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 tcf << AsC1VRegisterAllocationData("CodeGen", | 1441 tcf << AsC1VRegisterAllocationData("CodeGen", |
1439 data->register_allocation_data()); | 1442 data->register_allocation_data()); |
1440 } | 1443 } |
1441 | 1444 |
1442 data->DeleteRegisterAllocationZone(); | 1445 data->DeleteRegisterAllocationZone(); |
1443 } | 1446 } |
1444 | 1447 |
1445 } // namespace compiler | 1448 } // namespace compiler |
1446 } // namespace internal | 1449 } // namespace internal |
1447 } // namespace v8 | 1450 } // namespace v8 |
OLD | NEW |