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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled; | 893 typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled; |
894 } | 894 } |
895 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), | 895 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), |
896 typed_lowering_flags, data->jsgraph(), | 896 typed_lowering_flags, data->jsgraph(), |
897 temp_zone); | 897 temp_zone); |
898 JSIntrinsicLowering intrinsic_lowering( | 898 JSIntrinsicLowering intrinsic_lowering( |
899 &graph_reducer, data->jsgraph(), | 899 &graph_reducer, data->jsgraph(), |
900 data->info()->is_deoptimization_enabled() | 900 data->info()->is_deoptimization_enabled() |
901 ? JSIntrinsicLowering::kDeoptimizationEnabled | 901 ? JSIntrinsicLowering::kDeoptimizationEnabled |
902 : JSIntrinsicLowering::kDeoptimizationDisabled); | 902 : JSIntrinsicLowering::kDeoptimizationDisabled); |
| 903 ValueNumberingReducer value_numbering(temp_zone); |
903 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); | 904 SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph()); |
904 CheckpointElimination checkpoint_elimination(&graph_reducer); | 905 CheckpointElimination checkpoint_elimination(&graph_reducer); |
905 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 906 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
906 data->common(), data->machine()); | 907 data->common(), data->machine()); |
907 AddReducer(data, &graph_reducer, &dead_code_elimination); | 908 AddReducer(data, &graph_reducer, &dead_code_elimination); |
908 AddReducer(data, &graph_reducer, &builtin_reducer); | 909 AddReducer(data, &graph_reducer, &builtin_reducer); |
909 if (data->info()->is_deoptimization_enabled()) { | 910 if (data->info()->is_deoptimization_enabled()) { |
910 AddReducer(data, &graph_reducer, &create_lowering); | 911 AddReducer(data, &graph_reducer, &create_lowering); |
911 } | 912 } |
912 AddReducer(data, &graph_reducer, &typed_lowering); | 913 AddReducer(data, &graph_reducer, &typed_lowering); |
913 AddReducer(data, &graph_reducer, &intrinsic_lowering); | 914 AddReducer(data, &graph_reducer, &intrinsic_lowering); |
914 AddReducer(data, &graph_reducer, &load_elimination); | 915 AddReducer(data, &graph_reducer, &load_elimination); |
| 916 AddReducer(data, &graph_reducer, &value_numbering); |
915 AddReducer(data, &graph_reducer, &simple_reducer); | 917 AddReducer(data, &graph_reducer, &simple_reducer); |
916 AddReducer(data, &graph_reducer, &checkpoint_elimination); | 918 AddReducer(data, &graph_reducer, &checkpoint_elimination); |
917 AddReducer(data, &graph_reducer, &common_reducer); | 919 AddReducer(data, &graph_reducer, &common_reducer); |
918 graph_reducer.ReduceGraph(); | 920 graph_reducer.ReduceGraph(); |
919 } | 921 } |
920 }; | 922 }; |
921 | 923 |
922 | 924 |
923 struct BranchEliminationPhase { | 925 struct BranchEliminationPhase { |
924 static const char* phase_name() { return "branch condition elimination"; } | 926 static const char* phase_name() { return "branch condition elimination"; } |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1831 data->DeleteRegisterAllocationZone(); | 1833 data->DeleteRegisterAllocationZone(); |
1832 } | 1834 } |
1833 | 1835 |
1834 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1836 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1835 | 1837 |
1836 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1838 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1837 | 1839 |
1838 } // namespace compiler | 1840 } // namespace compiler |
1839 } // namespace internal | 1841 } // namespace internal |
1840 } // namespace v8 | 1842 } // namespace v8 |
OLD | NEW |