| 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 <memory> | 8 #include <memory> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 | 1134 |
| 1135 void Run(PipelineData* data, Zone* temp_zone) { | 1135 void Run(PipelineData* data, Zone* temp_zone) { |
| 1136 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 1136 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 1137 BranchElimination branch_condition_elimination(&graph_reducer, | 1137 BranchElimination branch_condition_elimination(&graph_reducer, |
| 1138 data->jsgraph(), temp_zone); | 1138 data->jsgraph(), temp_zone); |
| 1139 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 1139 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 1140 data->common()); | 1140 data->common()); |
| 1141 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); | 1141 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); |
| 1142 LoadElimination load_elimination(&graph_reducer, data->jsgraph(), | 1142 LoadElimination load_elimination(&graph_reducer, data->jsgraph(), |
| 1143 temp_zone); | 1143 temp_zone); |
| 1144 CheckpointElimination checkpoint_elimination(&graph_reducer); |
| 1144 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); | 1145 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); |
| 1145 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 1146 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 1146 data->common(), data->machine()); | 1147 data->common(), data->machine()); |
| 1147 AddReducer(data, &graph_reducer, &branch_condition_elimination); | 1148 AddReducer(data, &graph_reducer, &branch_condition_elimination); |
| 1148 AddReducer(data, &graph_reducer, &dead_code_elimination); | 1149 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 1149 AddReducer(data, &graph_reducer, &redundancy_elimination); | 1150 AddReducer(data, &graph_reducer, &redundancy_elimination); |
| 1150 AddReducer(data, &graph_reducer, &load_elimination); | 1151 AddReducer(data, &graph_reducer, &load_elimination); |
| 1152 AddReducer(data, &graph_reducer, &checkpoint_elimination); |
| 1151 AddReducer(data, &graph_reducer, &common_reducer); | 1153 AddReducer(data, &graph_reducer, &common_reducer); |
| 1152 AddReducer(data, &graph_reducer, &value_numbering); | 1154 AddReducer(data, &graph_reducer, &value_numbering); |
| 1153 graph_reducer.ReduceGraph(); | 1155 graph_reducer.ReduceGraph(); |
| 1154 } | 1156 } |
| 1155 }; | 1157 }; |
| 1156 | 1158 |
| 1157 struct MemoryOptimizationPhase { | 1159 struct MemoryOptimizationPhase { |
| 1158 static const char* phase_name() { return "memory optimization"; } | 1160 static const char* phase_name() { return "memory optimization"; } |
| 1159 | 1161 |
| 1160 void Run(PipelineData* data, Zone* temp_zone) { | 1162 void Run(PipelineData* data, Zone* temp_zone) { |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 data->DeleteRegisterAllocationZone(); | 2027 data->DeleteRegisterAllocationZone(); |
| 2026 } | 2028 } |
| 2027 | 2029 |
| 2028 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2030 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 2029 | 2031 |
| 2030 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2032 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 2031 | 2033 |
| 2032 } // namespace compiler | 2034 } // namespace compiler |
| 2033 } // namespace internal | 2035 } // namespace internal |
| 2034 } // namespace v8 | 2036 } // namespace v8 |
| OLD | NEW |