| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 602 |
| 603 struct TypedLoweringPhase { | 603 struct TypedLoweringPhase { |
| 604 static const char* phase_name() { return "typed lowering"; } | 604 static const char* phase_name() { return "typed lowering"; } |
| 605 | 605 |
| 606 void Run(PipelineData* data, Zone* temp_zone) { | 606 void Run(PipelineData* data, Zone* temp_zone) { |
| 607 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); | 607 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); |
| 608 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), | 608 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), |
| 609 data->common()); | 609 data->common()); |
| 610 LoadElimination load_elimination(&graph_reducer); | 610 LoadElimination load_elimination(&graph_reducer); |
| 611 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); | 611 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); |
| 612 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags; |
| 613 if (data->info()->is_deoptimization_enabled()) { |
| 614 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled; |
| 615 } |
| 616 if (data->info()->shared_info()->HasBytecodeArray()) { |
| 617 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction; |
| 618 } |
| 612 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), | 619 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), |
| 613 data->info()->is_deoptimization_enabled() | 620 typed_lowering_flags, data->jsgraph(), |
| 614 ? JSTypedLowering::kDeoptimizationEnabled | 621 temp_zone); |
| 615 : JSTypedLowering::kNoFlags, | |
| 616 data->jsgraph(), temp_zone); | |
| 617 JSIntrinsicLowering intrinsic_lowering( | 622 JSIntrinsicLowering intrinsic_lowering( |
| 618 &graph_reducer, data->jsgraph(), | 623 &graph_reducer, data->jsgraph(), |
| 619 data->info()->is_deoptimization_enabled() | 624 data->info()->is_deoptimization_enabled() |
| 620 ? JSIntrinsicLowering::kDeoptimizationEnabled | 625 ? JSIntrinsicLowering::kDeoptimizationEnabled |
| 621 : JSIntrinsicLowering::kDeoptimizationDisabled); | 626 : JSIntrinsicLowering::kDeoptimizationDisabled); |
| 622 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 627 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 623 data->common(), data->machine()); | 628 data->common(), data->machine()); |
| 624 AddReducer(data, &graph_reducer, &dead_code_elimination); | 629 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 625 AddReducer(data, &graph_reducer, &builtin_reducer); | 630 AddReducer(data, &graph_reducer, &builtin_reducer); |
| 626 AddReducer(data, &graph_reducer, &typed_lowering); | 631 AddReducer(data, &graph_reducer, &typed_lowering); |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 tcf << AsC1VRegisterAllocationData("CodeGen", | 1480 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1476 data->register_allocation_data()); | 1481 data->register_allocation_data()); |
| 1477 } | 1482 } |
| 1478 | 1483 |
| 1479 data->DeleteRegisterAllocationZone(); | 1484 data->DeleteRegisterAllocationZone(); |
| 1480 } | 1485 } |
| 1481 | 1486 |
| 1482 } // namespace compiler | 1487 } // namespace compiler |
| 1483 } // namespace internal | 1488 } // namespace internal |
| 1484 } // namespace v8 | 1489 } // namespace v8 |
| OLD | NEW |