| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 struct InliningPhase { | 497 struct InliningPhase { |
| 498 static const char* phase_name() { return "inlining"; } | 498 static const char* phase_name() { return "inlining"; } |
| 499 | 499 |
| 500 void Run(PipelineData* data, Zone* temp_zone) { | 500 void Run(PipelineData* data, Zone* temp_zone) { |
| 501 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 501 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 502 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 502 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 503 data->common()); | 503 data->common()); |
| 504 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 504 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 505 data->common(), data->machine()); | 505 data->common(), data->machine()); |
| 506 JSContextSpecialization context_specialization( | 506 JSContextSpecialization context_specialization( |
| 507 &graph_reducer, data->jsgraph(), data->info()->is_context_specializing() | 507 &graph_reducer, data->jsgraph(), |
| 508 ? data->info()->context() | 508 data->info()->is_function_context_specializing() |
| 509 : MaybeHandle<Context>()); | 509 ? data->info()->context() |
| 510 : MaybeHandle<Context>()); |
| 510 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), | 511 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
| 511 data->jsgraph()); | 512 data->jsgraph()); |
| 512 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() | 513 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
| 513 ? JSInliner::kGeneralInlining | 514 ? JSInliner::kGeneralInlining |
| 514 : JSInliner::kRestrictedInlining, | 515 : JSInliner::kRestrictedInlining, |
| 515 temp_zone, data->info(), data->jsgraph()); | 516 temp_zone, data->info(), data->jsgraph()); |
| 516 AddReducer(data, &graph_reducer, &dead_code_elimination); | 517 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 517 AddReducer(data, &graph_reducer, &common_reducer); | 518 AddReducer(data, &graph_reducer, &common_reducer); |
| 518 if (data->info()->is_frame_specializing()) { | 519 if (data->info()->is_frame_specializing()) { |
| 519 AddReducer(data, &graph_reducer, &frame_specialization); | 520 AddReducer(data, &graph_reducer, &frame_specialization); |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 tcf << AsC1VRegisterAllocationData("CodeGen", | 1410 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1410 data->register_allocation_data()); | 1411 data->register_allocation_data()); |
| 1411 } | 1412 } |
| 1412 | 1413 |
| 1413 data->DeleteRegisterAllocationZone(); | 1414 data->DeleteRegisterAllocationZone(); |
| 1414 } | 1415 } |
| 1415 | 1416 |
| 1416 } // namespace compiler | 1417 } // namespace compiler |
| 1417 } // namespace internal | 1418 } // namespace internal |
| 1418 } // namespace v8 | 1419 } // namespace v8 |
| OLD | NEW |