| 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" |
| 11 #include "src/base/platform/elapsed-timer.h" | 11 #include "src/base/platform/elapsed-timer.h" |
| 12 #include "src/compiler/ast-graph-builder.h" | 12 #include "src/compiler/ast-graph-builder.h" |
| 13 #include "src/compiler/ast-loop-assignment-analyzer.h" | 13 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 14 #include "src/compiler/basic-block-instrumentor.h" | 14 #include "src/compiler/basic-block-instrumentor.h" |
| 15 #include "src/compiler/binary-operator-reducer.h" | |
| 16 #include "src/compiler/branch-elimination.h" | 15 #include "src/compiler/branch-elimination.h" |
| 17 #include "src/compiler/bytecode-graph-builder.h" | 16 #include "src/compiler/bytecode-graph-builder.h" |
| 18 #include "src/compiler/change-lowering.h" | 17 #include "src/compiler/change-lowering.h" |
| 19 #include "src/compiler/code-generator.h" | 18 #include "src/compiler/code-generator.h" |
| 20 #include "src/compiler/common-operator-reducer.h" | 19 #include "src/compiler/common-operator-reducer.h" |
| 21 #include "src/compiler/control-flow-optimizer.h" | 20 #include "src/compiler/control-flow-optimizer.h" |
| 22 #include "src/compiler/dead-code-elimination.h" | 21 #include "src/compiler/dead-code-elimination.h" |
| 23 #include "src/compiler/frame-elider.h" | 22 #include "src/compiler/frame-elider.h" |
| 24 #include "src/compiler/graph-replay.h" | 23 #include "src/compiler/graph-replay.h" |
| 25 #include "src/compiler/graph-trimmer.h" | 24 #include "src/compiler/graph-trimmer.h" |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 data->source_positions()); | 632 data->source_positions()); |
| 634 lowering.LowerAllNodes(); | 633 lowering.LowerAllNodes(); |
| 635 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 634 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 636 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 635 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 637 data->common()); | 636 data->common()); |
| 638 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | 637 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
| 639 ValueNumberingReducer value_numbering(temp_zone); | 638 ValueNumberingReducer value_numbering(temp_zone); |
| 640 MachineOperatorReducer machine_reducer(data->jsgraph()); | 639 MachineOperatorReducer machine_reducer(data->jsgraph()); |
| 641 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 640 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 642 data->common(), data->machine()); | 641 data->common(), data->machine()); |
| 643 BinaryOperatorReducer binary_reducer(&graph_reducer, data->graph(), | |
| 644 data->common(), data->machine()); | |
| 645 AddReducer(data, &graph_reducer, &dead_code_elimination); | 642 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 646 AddReducer(data, &graph_reducer, &simple_reducer); | 643 AddReducer(data, &graph_reducer, &simple_reducer); |
| 647 AddReducer(data, &graph_reducer, &value_numbering); | 644 AddReducer(data, &graph_reducer, &value_numbering); |
| 648 AddReducer(data, &graph_reducer, &machine_reducer); | 645 AddReducer(data, &graph_reducer, &machine_reducer); |
| 649 AddReducer(data, &graph_reducer, &common_reducer); | 646 AddReducer(data, &graph_reducer, &common_reducer); |
| 650 AddReducer(data, &graph_reducer, &binary_reducer); | |
| 651 graph_reducer.ReduceGraph(); | 647 graph_reducer.ReduceGraph(); |
| 652 } | 648 } |
| 653 }; | 649 }; |
| 654 | 650 |
| 655 | 651 |
| 656 struct ControlFlowOptimizationPhase { | 652 struct ControlFlowOptimizationPhase { |
| 657 static const char* phase_name() { return "control flow optimization"; } | 653 static const char* phase_name() { return "control flow optimization"; } |
| 658 | 654 |
| 659 void Run(PipelineData* data, Zone* temp_zone) { | 655 void Run(PipelineData* data, Zone* temp_zone) { |
| 660 ControlFlowOptimizer optimizer(data->graph(), data->common(), | 656 ControlFlowOptimizer optimizer(data->graph(), data->common(), |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 tcf << AsC1VRegisterAllocationData("CodeGen", | 1429 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1434 data->register_allocation_data()); | 1430 data->register_allocation_data()); |
| 1435 } | 1431 } |
| 1436 | 1432 |
| 1437 data->DeleteRegisterAllocationZone(); | 1433 data->DeleteRegisterAllocationZone(); |
| 1438 } | 1434 } |
| 1439 | 1435 |
| 1440 } // namespace compiler | 1436 } // namespace compiler |
| 1441 } // namespace internal | 1437 } // namespace internal |
| 1442 } // namespace v8 | 1438 } // namespace v8 |
| OLD | NEW |