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

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

Issue 1473073004: [compiler] merge binary-operator-reducer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: range fixes Created 5 years 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
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"
11 #include "src/base/platform/elapsed-timer.h" 11 #include "src/base/platform/elapsed-timer.h"
12 #include "src/compiler/ast-graph-builder.h" 12 #include "src/compiler/ast-graph-builder.h"
13 #include "src/compiler/ast-loop-assignment-analyzer.h" 13 #include "src/compiler/ast-loop-assignment-analyzer.h"
14 #include "src/compiler/basic-block-instrumentor.h" 14 #include "src/compiler/basic-block-instrumentor.h"
15 #include "src/compiler/binary-operator-reducer.h"
16 #include "src/compiler/branch-elimination.h" 15 #include "src/compiler/branch-elimination.h"
17 #include "src/compiler/bytecode-graph-builder.h" 16 #include "src/compiler/bytecode-graph-builder.h"
18 #include "src/compiler/change-lowering.h" 17 #include "src/compiler/change-lowering.h"
19 #include "src/compiler/code-generator.h" 18 #include "src/compiler/code-generator.h"
20 #include "src/compiler/common-operator-reducer.h" 19 #include "src/compiler/common-operator-reducer.h"
21 #include "src/compiler/control-flow-optimizer.h" 20 #include "src/compiler/control-flow-optimizer.h"
22 #include "src/compiler/dead-code-elimination.h" 21 #include "src/compiler/dead-code-elimination.h"
23 #include "src/compiler/frame-elider.h" 22 #include "src/compiler/frame-elider.h"
24 #include "src/compiler/graph-replay.h" 23 #include "src/compiler/graph-replay.h"
25 #include "src/compiler/graph-trimmer.h" 24 #include "src/compiler/graph-trimmer.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 data->source_positions()); 631 data->source_positions());
633 lowering.LowerAllNodes(); 632 lowering.LowerAllNodes();
634 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 633 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
635 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 634 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
636 data->common()); 635 data->common());
637 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 636 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
638 ValueNumberingReducer value_numbering(temp_zone); 637 ValueNumberingReducer value_numbering(temp_zone);
639 MachineOperatorReducer machine_reducer(data->jsgraph()); 638 MachineOperatorReducer machine_reducer(data->jsgraph());
640 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 639 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
641 data->common(), data->machine()); 640 data->common(), data->machine());
642 BinaryOperatorReducer binary_reducer(&graph_reducer, data->graph(),
643 data->common(), data->machine());
644 AddReducer(data, &graph_reducer, &dead_code_elimination); 641 AddReducer(data, &graph_reducer, &dead_code_elimination);
645 AddReducer(data, &graph_reducer, &simple_reducer); 642 AddReducer(data, &graph_reducer, &simple_reducer);
646 AddReducer(data, &graph_reducer, &value_numbering); 643 AddReducer(data, &graph_reducer, &value_numbering);
647 AddReducer(data, &graph_reducer, &machine_reducer); 644 AddReducer(data, &graph_reducer, &machine_reducer);
648 AddReducer(data, &graph_reducer, &common_reducer); 645 AddReducer(data, &graph_reducer, &common_reducer);
649 AddReducer(data, &graph_reducer, &binary_reducer);
650 graph_reducer.ReduceGraph(); 646 graph_reducer.ReduceGraph();
651 } 647 }
652 }; 648 };
653 649
654 650
655 struct ControlFlowOptimizationPhase { 651 struct ControlFlowOptimizationPhase {
656 static const char* phase_name() { return "control flow optimization"; } 652 static const char* phase_name() { return "control flow optimization"; }
657 653
658 void Run(PipelineData* data, Zone* temp_zone) { 654 void Run(PipelineData* data, Zone* temp_zone) {
659 ControlFlowOptimizer optimizer(data->graph(), data->common(), 655 ControlFlowOptimizer optimizer(data->graph(), data->common(),
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 tcf << AsC1VRegisterAllocationData("CodeGen", 1422 tcf << AsC1VRegisterAllocationData("CodeGen",
1427 data->register_allocation_data()); 1423 data->register_allocation_data());
1428 } 1424 }
1429 1425
1430 data->DeleteRegisterAllocationZone(); 1426 data->DeleteRegisterAllocationZone();
1431 } 1427 }
1432 1428
1433 } // namespace compiler 1429 } // namespace compiler
1434 } // namespace internal 1430 } // namespace internal
1435 } // namespace v8 1431 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698