| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 struct NativeContextSpecializationPhase { | 499 struct NativeContextSpecializationPhase { |
| 500 static const char* phase_name() { return "native context specialization"; } | 500 static const char* phase_name() { return "native context specialization"; } |
| 501 | 501 |
| 502 void Run(PipelineData* data, Zone* temp_zone) { | 502 void Run(PipelineData* data, Zone* temp_zone) { |
| 503 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 503 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 504 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 504 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 505 data->common()); | 505 data->common()); |
| 506 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 506 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 507 data->common(), data->machine()); | 507 data->common(), data->machine()); |
| 508 JSGlobalSpecialization::Flags flags = JSGlobalSpecialization::kNoFlags; | |
| 509 if (data->info()->is_deoptimization_enabled()) { | |
| 510 flags |= JSGlobalSpecialization::kDeoptimizationEnabled; | |
| 511 } | |
| 512 if (data->info()->is_typing_enabled()) { | |
| 513 flags |= JSGlobalSpecialization::kTypingEnabled; | |
| 514 } | |
| 515 JSGlobalSpecialization global_specialization( | 508 JSGlobalSpecialization global_specialization( |
| 516 &graph_reducer, data->jsgraph(), flags, | 509 &graph_reducer, data->jsgraph(), |
| 510 data->info()->is_deoptimization_enabled() |
| 511 ? JSGlobalSpecialization::kDeoptimizationEnabled |
| 512 : JSGlobalSpecialization::kNoFlags, |
| 517 handle(data->info()->global_object(), data->isolate()), | 513 handle(data->info()->global_object(), data->isolate()), |
| 518 data->info()->dependencies()); | 514 data->info()->dependencies()); |
| 519 AddReducer(data, &graph_reducer, &dead_code_elimination); | 515 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 520 AddReducer(data, &graph_reducer, &common_reducer); | 516 AddReducer(data, &graph_reducer, &common_reducer); |
| 521 AddReducer(data, &graph_reducer, &global_specialization); | 517 AddReducer(data, &graph_reducer, &global_specialization); |
| 522 graph_reducer.ReduceGraph(); | 518 graph_reducer.ReduceGraph(); |
| 523 } | 519 } |
| 524 }; | 520 }; |
| 525 | 521 |
| 526 | 522 |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 tcf << AsC1VRegisterAllocationData("CodeGen", | 1444 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1449 data->register_allocation_data()); | 1445 data->register_allocation_data()); |
| 1450 } | 1446 } |
| 1451 | 1447 |
| 1452 data->DeleteRegisterAllocationZone(); | 1448 data->DeleteRegisterAllocationZone(); |
| 1453 } | 1449 } |
| 1454 | 1450 |
| 1455 } // namespace compiler | 1451 } // namespace compiler |
| 1456 } // namespace internal | 1452 } // namespace internal |
| 1457 } // namespace v8 | 1453 } // namespace v8 |
| OLD | NEW |