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 <memory> | 8 #include <memory> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 PipelineRunScope scope(data, "WASM optimization"); | 686 PipelineRunScope scope(data, "WASM optimization"); |
687 JSGraphReducer graph_reducer(data->jsgraph(), scope.zone()); | 687 JSGraphReducer graph_reducer(data->jsgraph(), scope.zone()); |
688 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 688 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
689 data->common()); | 689 data->common()); |
690 ValueNumberingReducer value_numbering(scope.zone(), data->graph()->zone()); | 690 ValueNumberingReducer value_numbering(scope.zone(), data->graph()->zone()); |
691 MachineOperatorReducer machine_reducer(data->jsgraph(), | 691 MachineOperatorReducer machine_reducer(data->jsgraph(), |
692 allow_signalling_nan_); | 692 allow_signalling_nan_); |
693 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 693 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
694 data->common(), data->machine()); | 694 data->common(), data->machine()); |
695 AddReducer(data, &graph_reducer, &dead_code_elimination); | 695 AddReducer(data, &graph_reducer, &dead_code_elimination); |
696 AddReducer(data, &graph_reducer, &value_numbering); | |
697 AddReducer(data, &graph_reducer, &machine_reducer); | 696 AddReducer(data, &graph_reducer, &machine_reducer); |
698 AddReducer(data, &graph_reducer, &common_reducer); | 697 AddReducer(data, &graph_reducer, &common_reducer); |
| 698 AddReducer(data, &graph_reducer, &value_numbering); |
699 graph_reducer.ReduceGraph(); | 699 graph_reducer.ReduceGraph(); |
700 pipeline_.RunPrintAndVerify("Optimized Machine", true); | 700 pipeline_.RunPrintAndVerify("Optimized Machine", true); |
701 } | 701 } |
702 | 702 |
703 if (!pipeline_.ScheduleAndSelectInstructions(&linkage_, true)) return FAILED; | 703 if (!pipeline_.ScheduleAndSelectInstructions(&linkage_, true)) return FAILED; |
704 return SUCCEEDED; | 704 return SUCCEEDED; |
705 } | 705 } |
706 | 706 |
707 PipelineWasmCompilationJob::Status | 707 PipelineWasmCompilationJob::Status |
708 PipelineWasmCompilationJob::FinalizeJobImpl() { | 708 PipelineWasmCompilationJob::FinalizeJobImpl() { |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 data->DeleteRegisterAllocationZone(); | 2027 data->DeleteRegisterAllocationZone(); |
2028 } | 2028 } |
2029 | 2029 |
2030 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2030 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
2031 | 2031 |
2032 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2032 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
2033 | 2033 |
2034 } // namespace compiler | 2034 } // namespace compiler |
2035 } // namespace internal | 2035 } // namespace internal |
2036 } // namespace v8 | 2036 } // namespace v8 |
OLD | NEW |