| 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/branch-elimination.h" | 15 #include "src/compiler/branch-elimination.h" |
| 16 #include "src/compiler/bytecode-graph-builder.h" | 16 #include "src/compiler/bytecode-graph-builder.h" |
| 17 #include "src/compiler/checkpoint-elimination.h" |
| 17 #include "src/compiler/code-generator.h" | 18 #include "src/compiler/code-generator.h" |
| 18 #include "src/compiler/common-operator-reducer.h" | 19 #include "src/compiler/common-operator-reducer.h" |
| 19 #include "src/compiler/control-flow-optimizer.h" | 20 #include "src/compiler/control-flow-optimizer.h" |
| 20 #include "src/compiler/dead-code-elimination.h" | 21 #include "src/compiler/dead-code-elimination.h" |
| 21 #include "src/compiler/effect-control-linearizer.h" | 22 #include "src/compiler/effect-control-linearizer.h" |
| 22 #include "src/compiler/escape-analysis-reducer.h" | 23 #include "src/compiler/escape-analysis-reducer.h" |
| 23 #include "src/compiler/escape-analysis.h" | 24 #include "src/compiler/escape-analysis.h" |
| 24 #include "src/compiler/frame-elider.h" | 25 #include "src/compiler/frame-elider.h" |
| 25 #include "src/compiler/graph-replay.h" | 26 #include "src/compiler/graph-replay.h" |
| 26 #include "src/compiler/graph-trimmer.h" | 27 #include "src/compiler/graph-trimmer.h" |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 } | 885 } |
| 885 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), | 886 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), |
| 886 typed_lowering_flags, data->jsgraph(), | 887 typed_lowering_flags, data->jsgraph(), |
| 887 temp_zone); | 888 temp_zone); |
| 888 JSIntrinsicLowering intrinsic_lowering( | 889 JSIntrinsicLowering intrinsic_lowering( |
| 889 &graph_reducer, data->jsgraph(), | 890 &graph_reducer, data->jsgraph(), |
| 890 data->info()->is_deoptimization_enabled() | 891 data->info()->is_deoptimization_enabled() |
| 891 ? JSIntrinsicLowering::kDeoptimizationEnabled | 892 ? JSIntrinsicLowering::kDeoptimizationEnabled |
| 892 : JSIntrinsicLowering::kDeoptimizationDisabled); | 893 : JSIntrinsicLowering::kDeoptimizationDisabled); |
| 893 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | 894 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
| 895 CheckpointElimination checkpoint_elimination(&graph_reducer); |
| 894 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 896 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 895 data->common(), data->machine()); | 897 data->common(), data->machine()); |
| 896 AddReducer(data, &graph_reducer, &dead_code_elimination); | 898 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 897 AddReducer(data, &graph_reducer, &builtin_reducer); | 899 AddReducer(data, &graph_reducer, &builtin_reducer); |
| 898 if (data->info()->is_deoptimization_enabled()) { | 900 if (data->info()->is_deoptimization_enabled()) { |
| 899 AddReducer(data, &graph_reducer, &create_lowering); | 901 AddReducer(data, &graph_reducer, &create_lowering); |
| 900 } | 902 } |
| 901 AddReducer(data, &graph_reducer, &typed_lowering); | 903 AddReducer(data, &graph_reducer, &typed_lowering); |
| 902 AddReducer(data, &graph_reducer, &intrinsic_lowering); | 904 AddReducer(data, &graph_reducer, &intrinsic_lowering); |
| 903 AddReducer(data, &graph_reducer, &load_elimination); | 905 AddReducer(data, &graph_reducer, &load_elimination); |
| 904 AddReducer(data, &graph_reducer, &simple_reducer); | 906 AddReducer(data, &graph_reducer, &simple_reducer); |
| 907 AddReducer(data, &graph_reducer, &checkpoint_elimination); |
| 905 AddReducer(data, &graph_reducer, &common_reducer); | 908 AddReducer(data, &graph_reducer, &common_reducer); |
| 906 graph_reducer.ReduceGraph(); | 909 graph_reducer.ReduceGraph(); |
| 907 } | 910 } |
| 908 }; | 911 }; |
| 909 | 912 |
| 910 | 913 |
| 911 struct BranchEliminationPhase { | 914 struct BranchEliminationPhase { |
| 912 static const char* phase_name() { return "branch condition elimination"; } | 915 static const char* phase_name() { return "branch condition elimination"; } |
| 913 | 916 |
| 914 void Run(PipelineData* data, Zone* temp_zone) { | 917 void Run(PipelineData* data, Zone* temp_zone) { |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 data->DeleteRegisterAllocationZone(); | 1799 data->DeleteRegisterAllocationZone(); |
| 1797 } | 1800 } |
| 1798 | 1801 |
| 1799 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1802 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 1800 | 1803 |
| 1801 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1804 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 1802 | 1805 |
| 1803 } // namespace compiler | 1806 } // namespace compiler |
| 1804 } // namespace internal | 1807 } // namespace internal |
| 1805 } // namespace v8 | 1808 } // namespace v8 |
| OLD | NEW |