Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Side by Side Diff: src/compiler/pipeline.cc

Issue 1202263006: [turbofan] Revive the useful parts of the SimplifiedOperatorReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reordered reducers. REBASE Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | src/compiler/simplified-operator-reducer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 #include "src/compiler/machine-operator-reducer.h" 38 #include "src/compiler/machine-operator-reducer.h"
39 #include "src/compiler/move-optimizer.h" 39 #include "src/compiler/move-optimizer.h"
40 #include "src/compiler/osr.h" 40 #include "src/compiler/osr.h"
41 #include "src/compiler/pipeline-statistics.h" 41 #include "src/compiler/pipeline-statistics.h"
42 #include "src/compiler/register-allocator.h" 42 #include "src/compiler/register-allocator.h"
43 #include "src/compiler/register-allocator-verifier.h" 43 #include "src/compiler/register-allocator-verifier.h"
44 #include "src/compiler/schedule.h" 44 #include "src/compiler/schedule.h"
45 #include "src/compiler/scheduler.h" 45 #include "src/compiler/scheduler.h"
46 #include "src/compiler/select-lowering.h" 46 #include "src/compiler/select-lowering.h"
47 #include "src/compiler/simplified-lowering.h" 47 #include "src/compiler/simplified-lowering.h"
48 #include "src/compiler/simplified-operator-reducer.h"
48 #include "src/compiler/tail-call-optimization.h" 49 #include "src/compiler/tail-call-optimization.h"
49 #include "src/compiler/typer.h" 50 #include "src/compiler/typer.h"
50 #include "src/compiler/value-numbering-reducer.h" 51 #include "src/compiler/value-numbering-reducer.h"
51 #include "src/compiler/verifier.h" 52 #include "src/compiler/verifier.h"
52 #include "src/compiler/zone-pool.h" 53 #include "src/compiler/zone-pool.h"
53 #include "src/ostreams.h" 54 #include "src/ostreams.h"
54 #include "src/type-info.h" 55 #include "src/type-info.h"
55 #include "src/utils.h" 56 #include "src/utils.h"
56 57
57 namespace v8 { 58 namespace v8 {
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 struct SimplifiedLoweringPhase { 591 struct SimplifiedLoweringPhase {
591 static const char* phase_name() { return "simplified lowering"; } 592 static const char* phase_name() { return "simplified lowering"; }
592 593
593 void Run(PipelineData* data, Zone* temp_zone) { 594 void Run(PipelineData* data, Zone* temp_zone) {
594 SimplifiedLowering lowering(data->jsgraph(), temp_zone, 595 SimplifiedLowering lowering(data->jsgraph(), temp_zone,
595 data->source_positions()); 596 data->source_positions());
596 lowering.LowerAllNodes(); 597 lowering.LowerAllNodes();
597 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 598 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
598 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 599 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
599 data->common()); 600 data->common());
600 ValueNumberingReducer vn_reducer(temp_zone); 601 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
602 ValueNumberingReducer value_numbering(temp_zone);
601 MachineOperatorReducer machine_reducer(data->jsgraph()); 603 MachineOperatorReducer machine_reducer(data->jsgraph());
602 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 604 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
603 data->common(), data->machine()); 605 data->common(), data->machine());
604 AddReducer(data, &graph_reducer, &dead_code_elimination); 606 AddReducer(data, &graph_reducer, &dead_code_elimination);
605 AddReducer(data, &graph_reducer, &vn_reducer); 607 AddReducer(data, &graph_reducer, &simple_reducer);
608 AddReducer(data, &graph_reducer, &value_numbering);
606 AddReducer(data, &graph_reducer, &machine_reducer); 609 AddReducer(data, &graph_reducer, &machine_reducer);
607 AddReducer(data, &graph_reducer, &common_reducer); 610 AddReducer(data, &graph_reducer, &common_reducer);
608 graph_reducer.ReduceGraph(); 611 graph_reducer.ReduceGraph();
609 } 612 }
610 }; 613 };
611 614
612 615
613 struct ControlFlowOptimizationPhase { 616 struct ControlFlowOptimizationPhase {
614 static const char* phase_name() { return "control flow optimization"; } 617 static const char* phase_name() { return "control flow optimization"; }
615 618
616 void Run(PipelineData* data, Zone* temp_zone) { 619 void Run(PipelineData* data, Zone* temp_zone) {
617 ControlFlowOptimizer optimizer(data->graph(), data->common(), 620 ControlFlowOptimizer optimizer(data->graph(), data->common(),
618 data->machine(), temp_zone); 621 data->machine(), temp_zone);
619 optimizer.Optimize(); 622 optimizer.Optimize();
620 } 623 }
621 }; 624 };
622 625
623 626
624 struct ChangeLoweringPhase { 627 struct ChangeLoweringPhase {
625 static const char* phase_name() { return "change lowering"; } 628 static const char* phase_name() { return "change lowering"; }
626 629
627 void Run(PipelineData* data, Zone* temp_zone) { 630 void Run(PipelineData* data, Zone* temp_zone) {
628 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 631 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
629 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 632 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
630 data->common()); 633 data->common());
631 ValueNumberingReducer vn_reducer(temp_zone); 634 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
635 ValueNumberingReducer value_numbering(temp_zone);
632 ChangeLowering lowering(data->jsgraph()); 636 ChangeLowering lowering(data->jsgraph());
633 MachineOperatorReducer machine_reducer(data->jsgraph()); 637 MachineOperatorReducer machine_reducer(data->jsgraph());
634 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 638 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
635 data->common(), data->machine()); 639 data->common(), data->machine());
636 AddReducer(data, &graph_reducer, &dead_code_elimination); 640 AddReducer(data, &graph_reducer, &dead_code_elimination);
637 AddReducer(data, &graph_reducer, &vn_reducer); 641 AddReducer(data, &graph_reducer, &simple_reducer);
642 AddReducer(data, &graph_reducer, &value_numbering);
638 AddReducer(data, &graph_reducer, &lowering); 643 AddReducer(data, &graph_reducer, &lowering);
639 AddReducer(data, &graph_reducer, &machine_reducer); 644 AddReducer(data, &graph_reducer, &machine_reducer);
640 AddReducer(data, &graph_reducer, &common_reducer); 645 AddReducer(data, &graph_reducer, &common_reducer);
641 graph_reducer.ReduceGraph(); 646 graph_reducer.ReduceGraph();
642 } 647 }
643 }; 648 };
644 649
645 650
646 struct EarlyGraphTrimmingPhase { 651 struct EarlyGraphTrimmingPhase {
647 static const char* phase_name() { return "early graph trimming"; } 652 static const char* phase_name() { return "early graph trimming"; }
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 tcf << AsC1VRegisterAllocationData("CodeGen", 1357 tcf << AsC1VRegisterAllocationData("CodeGen",
1353 data->register_allocation_data()); 1358 data->register_allocation_data());
1354 } 1359 }
1355 1360
1356 data->DeleteRegisterAllocationZone(); 1361 data->DeleteRegisterAllocationZone();
1357 } 1362 }
1358 1363
1359 } // namespace compiler 1364 } // namespace compiler
1360 } // namespace internal 1365 } // namespace internal
1361 } // namespace v8 1366 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/simplified-operator-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698