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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction; | 642 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction; |
643 } | 643 } |
644 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), | 644 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), |
645 typed_lowering_flags, data->jsgraph(), | 645 typed_lowering_flags, data->jsgraph(), |
646 temp_zone); | 646 temp_zone); |
647 JSIntrinsicLowering intrinsic_lowering( | 647 JSIntrinsicLowering intrinsic_lowering( |
648 &graph_reducer, data->jsgraph(), | 648 &graph_reducer, data->jsgraph(), |
649 data->info()->is_deoptimization_enabled() | 649 data->info()->is_deoptimization_enabled() |
650 ? JSIntrinsicLowering::kDeoptimizationEnabled | 650 ? JSIntrinsicLowering::kDeoptimizationEnabled |
651 : JSIntrinsicLowering::kDeoptimizationDisabled); | 651 : JSIntrinsicLowering::kDeoptimizationDisabled); |
| 652 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
652 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 653 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
653 data->common(), data->machine()); | 654 data->common(), data->machine()); |
654 AddReducer(data, &graph_reducer, &dead_code_elimination); | 655 AddReducer(data, &graph_reducer, &dead_code_elimination); |
655 AddReducer(data, &graph_reducer, &builtin_reducer); | 656 AddReducer(data, &graph_reducer, &builtin_reducer); |
656 if (data->info()->is_deoptimization_enabled()) { | 657 if (data->info()->is_deoptimization_enabled()) { |
657 AddReducer(data, &graph_reducer, &create_lowering); | 658 AddReducer(data, &graph_reducer, &create_lowering); |
658 } | 659 } |
659 AddReducer(data, &graph_reducer, &typed_lowering); | 660 AddReducer(data, &graph_reducer, &typed_lowering); |
660 AddReducer(data, &graph_reducer, &intrinsic_lowering); | 661 AddReducer(data, &graph_reducer, &intrinsic_lowering); |
661 AddReducer(data, &graph_reducer, &load_elimination); | 662 AddReducer(data, &graph_reducer, &load_elimination); |
| 663 AddReducer(data, &graph_reducer, &simple_reducer); |
662 AddReducer(data, &graph_reducer, &common_reducer); | 664 AddReducer(data, &graph_reducer, &common_reducer); |
663 graph_reducer.ReduceGraph(); | 665 graph_reducer.ReduceGraph(); |
664 } | 666 } |
665 }; | 667 }; |
666 | 668 |
667 | 669 |
668 struct BranchEliminationPhase { | 670 struct BranchEliminationPhase { |
669 static const char* phase_name() { return "branch condition elimination"; } | 671 static const char* phase_name() { return "branch condition elimination"; } |
670 | 672 |
671 void Run(PipelineData* data, Zone* temp_zone) { | 673 void Run(PipelineData* data, Zone* temp_zone) { |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 } | 1523 } |
1522 | 1524 |
1523 data->DeleteRegisterAllocationZone(); | 1525 data->DeleteRegisterAllocationZone(); |
1524 } | 1526 } |
1525 | 1527 |
1526 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1528 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1527 | 1529 |
1528 } // namespace compiler | 1530 } // namespace compiler |
1529 } // namespace internal | 1531 } // namespace internal |
1530 } // namespace v8 | 1532 } // namespace v8 |
OLD | NEW |