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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "src/compiler/jump-threading.h" | 42 #include "src/compiler/jump-threading.h" |
43 #include "src/compiler/live-range-separator.h" | 43 #include "src/compiler/live-range-separator.h" |
44 #include "src/compiler/load-elimination.h" | 44 #include "src/compiler/load-elimination.h" |
45 #include "src/compiler/loop-analysis.h" | 45 #include "src/compiler/loop-analysis.h" |
46 #include "src/compiler/loop-peeling.h" | 46 #include "src/compiler/loop-peeling.h" |
47 #include "src/compiler/machine-operator-reducer.h" | 47 #include "src/compiler/machine-operator-reducer.h" |
48 #include "src/compiler/memory-optimizer.h" | 48 #include "src/compiler/memory-optimizer.h" |
49 #include "src/compiler/move-optimizer.h" | 49 #include "src/compiler/move-optimizer.h" |
50 #include "src/compiler/osr.h" | 50 #include "src/compiler/osr.h" |
51 #include "src/compiler/pipeline-statistics.h" | 51 #include "src/compiler/pipeline-statistics.h" |
| 52 #include "src/compiler/redundancy-elimination.h" |
52 #include "src/compiler/register-allocator-verifier.h" | 53 #include "src/compiler/register-allocator-verifier.h" |
53 #include "src/compiler/register-allocator.h" | 54 #include "src/compiler/register-allocator.h" |
54 #include "src/compiler/schedule.h" | 55 #include "src/compiler/schedule.h" |
55 #include "src/compiler/scheduler.h" | 56 #include "src/compiler/scheduler.h" |
56 #include "src/compiler/select-lowering.h" | 57 #include "src/compiler/select-lowering.h" |
57 #include "src/compiler/simplified-lowering.h" | 58 #include "src/compiler/simplified-lowering.h" |
58 #include "src/compiler/simplified-operator-reducer.h" | 59 #include "src/compiler/simplified-operator-reducer.h" |
59 #include "src/compiler/simplified-operator.h" | 60 #include "src/compiler/simplified-operator.h" |
60 #include "src/compiler/tail-call-optimization.h" | 61 #include "src/compiler/tail-call-optimization.h" |
61 #include "src/compiler/type-hint-analyzer.h" | 62 #include "src/compiler/type-hint-analyzer.h" |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 | 967 |
967 struct EarlyOptimizationPhase { | 968 struct EarlyOptimizationPhase { |
968 static const char* phase_name() { return "early optimization"; } | 969 static const char* phase_name() { return "early optimization"; } |
969 | 970 |
970 void Run(PipelineData* data, Zone* temp_zone) { | 971 void Run(PipelineData* data, Zone* temp_zone) { |
971 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 972 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
972 JSGenericLowering generic_lowering(data->jsgraph()); | 973 JSGenericLowering generic_lowering(data->jsgraph()); |
973 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 974 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
974 data->common()); | 975 data->common()); |
975 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); | 976 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); |
| 977 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); |
976 ValueNumberingReducer value_numbering(temp_zone); | 978 ValueNumberingReducer value_numbering(temp_zone); |
977 MachineOperatorReducer machine_reducer(data->jsgraph()); | 979 MachineOperatorReducer machine_reducer(data->jsgraph()); |
978 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 980 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
979 data->common(), data->machine()); | 981 data->common(), data->machine()); |
980 AddReducer(data, &graph_reducer, &dead_code_elimination); | 982 AddReducer(data, &graph_reducer, &dead_code_elimination); |
981 AddReducer(data, &graph_reducer, &simple_reducer); | 983 AddReducer(data, &graph_reducer, &simple_reducer); |
| 984 AddReducer(data, &graph_reducer, &redundancy_elimination); |
982 AddReducer(data, &graph_reducer, &generic_lowering); | 985 AddReducer(data, &graph_reducer, &generic_lowering); |
983 AddReducer(data, &graph_reducer, &value_numbering); | 986 AddReducer(data, &graph_reducer, &value_numbering); |
984 AddReducer(data, &graph_reducer, &machine_reducer); | 987 AddReducer(data, &graph_reducer, &machine_reducer); |
985 AddReducer(data, &graph_reducer, &common_reducer); | 988 AddReducer(data, &graph_reducer, &common_reducer); |
986 graph_reducer.ReduceGraph(); | 989 graph_reducer.ReduceGraph(); |
987 } | 990 } |
988 }; | 991 }; |
989 | 992 |
990 struct ControlFlowOptimizationPhase { | 993 struct ControlFlowOptimizationPhase { |
991 static const char* phase_name() { return "control flow optimization"; } | 994 static const char* phase_name() { return "control flow optimization"; } |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 data->DeleteRegisterAllocationZone(); | 1815 data->DeleteRegisterAllocationZone(); |
1813 } | 1816 } |
1814 | 1817 |
1815 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1818 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1816 | 1819 |
1817 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1820 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1818 | 1821 |
1819 } // namespace compiler | 1822 } // namespace compiler |
1820 } // namespace internal | 1823 } // namespace internal |
1821 } // namespace v8 | 1824 } // namespace v8 |
OLD | NEW |