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