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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 } | 844 } |
845 }; | 845 }; |
846 | 846 |
847 struct LateOptimizationPhase { | 847 struct LateOptimizationPhase { |
848 static const char* phase_name() { return "late optimization"; } | 848 static const char* phase_name() { return "late optimization"; } |
849 | 849 |
850 void Run(PipelineData* data, Zone* temp_zone) { | 850 void Run(PipelineData* data, Zone* temp_zone) { |
851 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 851 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
852 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 852 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
853 data->common()); | 853 data->common()); |
854 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | |
855 ValueNumberingReducer value_numbering(temp_zone); | 854 ValueNumberingReducer value_numbering(temp_zone); |
856 ChangeLowering lowering(data->jsgraph()); | 855 ChangeLowering lowering(data->jsgraph()); |
857 MachineOperatorReducer machine_reducer(data->jsgraph()); | 856 MachineOperatorReducer machine_reducer(data->jsgraph()); |
858 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 857 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
859 data->common(), data->machine()); | 858 data->common(), data->machine()); |
860 SelectLowering select_lowering(data->jsgraph()->graph(), | 859 SelectLowering select_lowering(data->jsgraph()->graph(), |
861 data->jsgraph()->common()); | 860 data->jsgraph()->common()); |
862 TailCallOptimization tco(data->common(), data->graph()); | 861 TailCallOptimization tco(data->common(), data->graph()); |
863 AddReducer(data, &graph_reducer, &dead_code_elimination); | 862 AddReducer(data, &graph_reducer, &dead_code_elimination); |
864 AddReducer(data, &graph_reducer, &simple_reducer); | |
865 AddReducer(data, &graph_reducer, &value_numbering); | 863 AddReducer(data, &graph_reducer, &value_numbering); |
866 AddReducer(data, &graph_reducer, &lowering); | 864 AddReducer(data, &graph_reducer, &lowering); |
867 AddReducer(data, &graph_reducer, &machine_reducer); | 865 AddReducer(data, &graph_reducer, &machine_reducer); |
868 AddReducer(data, &graph_reducer, &common_reducer); | 866 AddReducer(data, &graph_reducer, &common_reducer); |
869 AddReducer(data, &graph_reducer, &select_lowering); | 867 AddReducer(data, &graph_reducer, &select_lowering); |
870 AddReducer(data, &graph_reducer, &tco); | 868 AddReducer(data, &graph_reducer, &tco); |
871 graph_reducer.ReduceGraph(); | 869 graph_reducer.ReduceGraph(); |
872 } | 870 } |
873 }; | 871 }; |
874 | 872 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 } | 1590 } |
1593 | 1591 |
1594 data->DeleteRegisterAllocationZone(); | 1592 data->DeleteRegisterAllocationZone(); |
1595 } | 1593 } |
1596 | 1594 |
1597 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1595 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1598 | 1596 |
1599 } // namespace compiler | 1597 } // namespace compiler |
1600 } // namespace internal | 1598 } // namespace internal |
1601 } // namespace v8 | 1599 } // namespace v8 |
OLD | NEW |