| 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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 } | 939 } |
| 940 }; | 940 }; |
| 941 | 941 |
| 942 | 942 |
| 943 struct EscapeAnalysisPhase { | 943 struct EscapeAnalysisPhase { |
| 944 static const char* phase_name() { return "escape analysis"; } | 944 static const char* phase_name() { return "escape analysis"; } |
| 945 | 945 |
| 946 void Run(PipelineData* data, Zone* temp_zone) { | 946 void Run(PipelineData* data, Zone* temp_zone) { |
| 947 EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(), | 947 EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(), |
| 948 temp_zone); | 948 temp_zone); |
| 949 if (!escape_analysis.Run()) return; | 949 escape_analysis.Run(); |
| 950 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 950 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 951 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(), | 951 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(), |
| 952 &escape_analysis, temp_zone); | 952 &escape_analysis, temp_zone); |
| 953 AddReducer(data, &graph_reducer, &escape_reducer); | 953 AddReducer(data, &graph_reducer, &escape_reducer); |
| 954 graph_reducer.ReduceGraph(); | 954 graph_reducer.ReduceGraph(); |
| 955 if (escape_reducer.compilation_failed()) { | 955 if (escape_reducer.compilation_failed()) { |
| 956 data->set_compilation_failed(); | 956 data->set_compilation_failed(); |
| 957 return; | 957 return; |
| 958 } | 958 } |
| 959 escape_reducer.VerifyReplacement(); | 959 escape_reducer.VerifyReplacement(); |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 data->DeleteRegisterAllocationZone(); | 2016 data->DeleteRegisterAllocationZone(); |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2019 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 2020 | 2020 |
| 2021 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2021 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 2022 | 2022 |
| 2023 } // namespace compiler | 2023 } // namespace compiler |
| 2024 } // namespace internal | 2024 } // namespace internal |
| 2025 } // namespace v8 | 2025 } // namespace v8 |
| OLD | NEW |