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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 struct InliningPhase { | 491 struct InliningPhase { |
492 static const char* phase_name() { return "inlining"; } | 492 static const char* phase_name() { return "inlining"; } |
493 | 493 |
494 void Run(PipelineData* data, Zone* temp_zone) { | 494 void Run(PipelineData* data, Zone* temp_zone) { |
495 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 495 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
496 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 496 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
497 data->common()); | 497 data->common()); |
498 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 498 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
499 data->common(), data->machine()); | 499 data->common(), data->machine()); |
500 JSContextSpecialization context_specialization( | 500 JSContextSpecialization context_specialization( |
501 &graph_reducer, data->jsgraph(), data->info()->context()); | 501 &graph_reducer, data->jsgraph(), data->info()->is_context_specializing() |
| 502 ? data->info()->context() |
| 503 : MaybeHandle<Context>()); |
502 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), | 504 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
503 data->jsgraph()); | 505 data->jsgraph()); |
504 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() | 506 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
505 ? JSInliner::kGeneralInlining | 507 ? JSInliner::kGeneralInlining |
506 : JSInliner::kRestrictedInlining, | 508 : JSInliner::kRestrictedInlining, |
507 temp_zone, data->info(), data->jsgraph()); | 509 temp_zone, data->info(), data->jsgraph()); |
508 AddReducer(data, &graph_reducer, &dead_code_elimination); | 510 AddReducer(data, &graph_reducer, &dead_code_elimination); |
509 AddReducer(data, &graph_reducer, &common_reducer); | 511 AddReducer(data, &graph_reducer, &common_reducer); |
510 if (data->info()->is_frame_specializing()) { | 512 if (data->info()->is_frame_specializing()) { |
511 AddReducer(data, &graph_reducer, &frame_specialization); | 513 AddReducer(data, &graph_reducer, &frame_specialization); |
512 } | 514 } |
513 if (data->info()->is_context_specializing()) { | 515 AddReducer(data, &graph_reducer, &context_specialization); |
514 AddReducer(data, &graph_reducer, &context_specialization); | |
515 } | |
516 AddReducer(data, &graph_reducer, &inliner); | 516 AddReducer(data, &graph_reducer, &inliner); |
517 graph_reducer.ReduceGraph(); | 517 graph_reducer.ReduceGraph(); |
518 } | 518 } |
519 }; | 519 }; |
520 | 520 |
521 | 521 |
522 struct TyperPhase { | 522 struct TyperPhase { |
523 static const char* phase_name() { return "typer"; } | 523 static const char* phase_name() { return "typer"; } |
524 | 524 |
525 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { | 525 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 tcf << AsC1VRegisterAllocationData("CodeGen", | 1357 tcf << AsC1VRegisterAllocationData("CodeGen", |
1358 data->register_allocation_data()); | 1358 data->register_allocation_data()); |
1359 } | 1359 } |
1360 | 1360 |
1361 data->DeleteRegisterAllocationZone(); | 1361 data->DeleteRegisterAllocationZone(); |
1362 } | 1362 } |
1363 | 1363 |
1364 } // namespace compiler | 1364 } // namespace compiler |
1365 } // namespace internal | 1365 } // namespace internal |
1366 } // namespace v8 | 1366 } // namespace v8 |
OLD | NEW |