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 12 matching lines...) Expand all Loading... |
23 #include "src/compiler/escape-analysis-reducer.h" | 23 #include "src/compiler/escape-analysis-reducer.h" |
24 #include "src/compiler/frame-elider.h" | 24 #include "src/compiler/frame-elider.h" |
25 #include "src/compiler/graph-replay.h" | 25 #include "src/compiler/graph-replay.h" |
26 #include "src/compiler/graph-trimmer.h" | 26 #include "src/compiler/graph-trimmer.h" |
27 #include "src/compiler/graph-visualizer.h" | 27 #include "src/compiler/graph-visualizer.h" |
28 #include "src/compiler/greedy-allocator.h" | 28 #include "src/compiler/greedy-allocator.h" |
29 #include "src/compiler/instruction.h" | 29 #include "src/compiler/instruction.h" |
30 #include "src/compiler/instruction-selector.h" | 30 #include "src/compiler/instruction-selector.h" |
31 #include "src/compiler/js-builtin-reducer.h" | 31 #include "src/compiler/js-builtin-reducer.h" |
32 #include "src/compiler/js-call-reducer.h" | 32 #include "src/compiler/js-call-reducer.h" |
33 #include "src/compiler/js-context-relaxation.h" | |
34 #include "src/compiler/js-context-specialization.h" | 33 #include "src/compiler/js-context-specialization.h" |
35 #include "src/compiler/js-create-lowering.h" | 34 #include "src/compiler/js-create-lowering.h" |
36 #include "src/compiler/js-frame-specialization.h" | 35 #include "src/compiler/js-frame-specialization.h" |
37 #include "src/compiler/js-generic-lowering.h" | 36 #include "src/compiler/js-generic-lowering.h" |
38 #include "src/compiler/js-global-object-specialization.h" | 37 #include "src/compiler/js-global-object-specialization.h" |
39 #include "src/compiler/js-inlining-heuristic.h" | 38 #include "src/compiler/js-inlining-heuristic.h" |
40 #include "src/compiler/js-intrinsic-lowering.h" | 39 #include "src/compiler/js-intrinsic-lowering.h" |
41 #include "src/compiler/js-native-context-specialization.h" | 40 #include "src/compiler/js-native-context-specialization.h" |
42 #include "src/compiler/js-typed-lowering.h" | 41 #include "src/compiler/js-typed-lowering.h" |
43 #include "src/compiler/jump-threading.h" | 42 #include "src/compiler/jump-threading.h" |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 } | 780 } |
782 } | 781 } |
783 }; | 782 }; |
784 | 783 |
785 | 784 |
786 struct GenericLoweringPhase { | 785 struct GenericLoweringPhase { |
787 static const char* phase_name() { return "generic lowering"; } | 786 static const char* phase_name() { return "generic lowering"; } |
788 | 787 |
789 void Run(PipelineData* data, Zone* temp_zone) { | 788 void Run(PipelineData* data, Zone* temp_zone) { |
790 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 789 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
791 JSContextRelaxation context_relaxing; | |
792 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 790 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
793 data->common()); | 791 data->common()); |
794 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 792 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
795 data->common(), data->machine()); | 793 data->common(), data->machine()); |
796 JSGenericLowering generic_lowering(data->info()->is_typing_enabled(), | 794 JSGenericLowering generic_lowering(data->info()->is_typing_enabled(), |
797 data->jsgraph()); | 795 data->jsgraph()); |
798 SelectLowering select_lowering(data->jsgraph()->graph(), | 796 SelectLowering select_lowering(data->jsgraph()->graph(), |
799 data->jsgraph()->common()); | 797 data->jsgraph()->common()); |
800 TailCallOptimization tco(data->common(), data->graph()); | 798 TailCallOptimization tco(data->common(), data->graph()); |
801 AddReducer(data, &graph_reducer, &context_relaxing); | |
802 AddReducer(data, &graph_reducer, &dead_code_elimination); | 799 AddReducer(data, &graph_reducer, &dead_code_elimination); |
803 AddReducer(data, &graph_reducer, &common_reducer); | 800 AddReducer(data, &graph_reducer, &common_reducer); |
804 AddReducer(data, &graph_reducer, &generic_lowering); | 801 AddReducer(data, &graph_reducer, &generic_lowering); |
805 AddReducer(data, &graph_reducer, &select_lowering); | 802 AddReducer(data, &graph_reducer, &select_lowering); |
806 AddReducer(data, &graph_reducer, &tco); | 803 AddReducer(data, &graph_reducer, &tco); |
807 graph_reducer.ReduceGraph(); | 804 graph_reducer.ReduceGraph(); |
808 } | 805 } |
809 }; | 806 }; |
810 | 807 |
811 | 808 |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 } | 1497 } |
1501 | 1498 |
1502 data->DeleteRegisterAllocationZone(); | 1499 data->DeleteRegisterAllocationZone(); |
1503 } | 1500 } |
1504 | 1501 |
1505 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1502 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1506 | 1503 |
1507 } // namespace compiler | 1504 } // namespace compiler |
1508 } // namespace internal | 1505 } // namespace internal |
1509 } // namespace v8 | 1506 } // namespace v8 |
OLD | NEW |