| 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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled; | 891 typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled; |
| 892 } | 892 } |
| 893 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), | 893 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), |
| 894 typed_lowering_flags, data->jsgraph(), | 894 typed_lowering_flags, data->jsgraph(), |
| 895 temp_zone); | 895 temp_zone); |
| 896 JSIntrinsicLowering intrinsic_lowering( | 896 JSIntrinsicLowering intrinsic_lowering( |
| 897 &graph_reducer, data->jsgraph(), | 897 &graph_reducer, data->jsgraph(), |
| 898 data->info()->is_deoptimization_enabled() | 898 data->info()->is_deoptimization_enabled() |
| 899 ? JSIntrinsicLowering::kDeoptimizationEnabled | 899 ? JSIntrinsicLowering::kDeoptimizationEnabled |
| 900 : JSIntrinsicLowering::kDeoptimizationDisabled); | 900 : JSIntrinsicLowering::kDeoptimizationDisabled); |
| 901 ValueNumberingReducer value_numbering(temp_zone); | 901 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); |
| 902 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); | 902 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); |
| 903 CheckpointElimination checkpoint_elimination(&graph_reducer); | 903 CheckpointElimination checkpoint_elimination(&graph_reducer); |
| 904 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 904 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 905 data->common(), data->machine()); | 905 data->common(), data->machine()); |
| 906 AddReducer(data, &graph_reducer, &dead_code_elimination); | 906 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 907 AddReducer(data, &graph_reducer, &builtin_reducer); | 907 AddReducer(data, &graph_reducer, &builtin_reducer); |
| 908 if (data->info()->is_deoptimization_enabled()) { | 908 if (data->info()->is_deoptimization_enabled()) { |
| 909 AddReducer(data, &graph_reducer, &create_lowering); | 909 AddReducer(data, &graph_reducer, &create_lowering); |
| 910 } | 910 } |
| 911 AddReducer(data, &graph_reducer, &typed_lowering); | 911 AddReducer(data, &graph_reducer, &typed_lowering); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 struct EarlyOptimizationPhase { | 948 struct EarlyOptimizationPhase { |
| 949 static const char* phase_name() { return "early optimization"; } | 949 static const char* phase_name() { return "early optimization"; } |
| 950 | 950 |
| 951 void Run(PipelineData* data, Zone* temp_zone) { | 951 void Run(PipelineData* data, Zone* temp_zone) { |
| 952 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 952 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 953 JSGenericLowering generic_lowering(data->jsgraph()); | 953 JSGenericLowering generic_lowering(data->jsgraph()); |
| 954 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 954 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 955 data->common()); | 955 data->common()); |
| 956 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); | 956 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); |
| 957 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); | 957 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); |
| 958 ValueNumberingReducer value_numbering(temp_zone); | 958 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); |
| 959 MachineOperatorReducer machine_reducer(data->jsgraph()); | 959 MachineOperatorReducer machine_reducer(data->jsgraph()); |
| 960 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 960 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 961 data->common(), data->machine()); | 961 data->common(), data->machine()); |
| 962 AddReducer(data, &graph_reducer, &dead_code_elimination); | 962 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 963 AddReducer(data, &graph_reducer, &simple_reducer); | 963 AddReducer(data, &graph_reducer, &simple_reducer); |
| 964 AddReducer(data, &graph_reducer, &redundancy_elimination); | 964 AddReducer(data, &graph_reducer, &redundancy_elimination); |
| 965 AddReducer(data, &graph_reducer, &generic_lowering); | 965 AddReducer(data, &graph_reducer, &generic_lowering); |
| 966 AddReducer(data, &graph_reducer, &value_numbering); | 966 AddReducer(data, &graph_reducer, &value_numbering); |
| 967 AddReducer(data, &graph_reducer, &machine_reducer); | 967 AddReducer(data, &graph_reducer, &machine_reducer); |
| 968 AddReducer(data, &graph_reducer, &common_reducer); | 968 AddReducer(data, &graph_reducer, &common_reducer); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 | 1054 |
| 1055 struct LateOptimizationPhase { | 1055 struct LateOptimizationPhase { |
| 1056 static const char* phase_name() { return "late optimization"; } | 1056 static const char* phase_name() { return "late optimization"; } |
| 1057 | 1057 |
| 1058 void Run(PipelineData* data, Zone* temp_zone) { | 1058 void Run(PipelineData* data, Zone* temp_zone) { |
| 1059 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 1059 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 1060 BranchElimination branch_condition_elimination(&graph_reducer, | 1060 BranchElimination branch_condition_elimination(&graph_reducer, |
| 1061 data->jsgraph(), temp_zone); | 1061 data->jsgraph(), temp_zone); |
| 1062 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 1062 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 1063 data->common()); | 1063 data->common()); |
| 1064 ValueNumberingReducer value_numbering(temp_zone); | 1064 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); |
| 1065 MachineOperatorReducer machine_reducer(data->jsgraph()); | 1065 MachineOperatorReducer machine_reducer(data->jsgraph()); |
| 1066 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 1066 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 1067 data->common(), data->machine()); | 1067 data->common(), data->machine()); |
| 1068 SelectLowering select_lowering(data->jsgraph()->graph(), | 1068 SelectLowering select_lowering(data->jsgraph()->graph(), |
| 1069 data->jsgraph()->common()); | 1069 data->jsgraph()->common()); |
| 1070 TailCallOptimization tco(data->common(), data->graph()); | 1070 TailCallOptimization tco(data->common(), data->graph()); |
| 1071 AddReducer(data, &graph_reducer, &branch_condition_elimination); | 1071 AddReducer(data, &graph_reducer, &branch_condition_elimination); |
| 1072 AddReducer(data, &graph_reducer, &dead_code_elimination); | 1072 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 1073 AddReducer(data, &graph_reducer, &value_numbering); | 1073 AddReducer(data, &graph_reducer, &value_numbering); |
| 1074 AddReducer(data, &graph_reducer, &machine_reducer); | 1074 AddReducer(data, &graph_reducer, &machine_reducer); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 data->DeleteRegisterAllocationZone(); | 1831 data->DeleteRegisterAllocationZone(); |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1834 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 1835 | 1835 |
| 1836 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1836 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 1837 | 1837 |
| 1838 } // namespace compiler | 1838 } // namespace compiler |
| 1839 } // namespace internal | 1839 } // namespace internal |
| 1840 } // namespace v8 | 1840 } // namespace v8 |
| OLD | NEW |