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

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

Issue 1350223006: binary-operator-reducer: reduce mul+div(shift) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make test conditional Created 5 years, 1 month 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"
15 #include "src/compiler/branch-elimination.h" 16 #include "src/compiler/branch-elimination.h"
16 #include "src/compiler/bytecode-graph-builder.h" 17 #include "src/compiler/bytecode-graph-builder.h"
17 #include "src/compiler/change-lowering.h" 18 #include "src/compiler/change-lowering.h"
18 #include "src/compiler/code-generator.h" 19 #include "src/compiler/code-generator.h"
19 #include "src/compiler/common-operator-reducer.h" 20 #include "src/compiler/common-operator-reducer.h"
20 #include "src/compiler/control-flow-optimizer.h" 21 #include "src/compiler/control-flow-optimizer.h"
21 #include "src/compiler/dead-code-elimination.h" 22 #include "src/compiler/dead-code-elimination.h"
22 #include "src/compiler/frame-elider.h" 23 #include "src/compiler/frame-elider.h"
23 #include "src/compiler/graph-replay.h" 24 #include "src/compiler/graph-replay.h"
24 #include "src/compiler/graph-trimmer.h" 25 #include "src/compiler/graph-trimmer.h"
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 data->source_positions()); 633 data->source_positions());
633 lowering.LowerAllNodes(); 634 lowering.LowerAllNodes();
634 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 635 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
635 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 636 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
636 data->common()); 637 data->common());
637 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 638 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
638 ValueNumberingReducer value_numbering(temp_zone); 639 ValueNumberingReducer value_numbering(temp_zone);
639 MachineOperatorReducer machine_reducer(data->jsgraph()); 640 MachineOperatorReducer machine_reducer(data->jsgraph());
640 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 641 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
641 data->common(), data->machine()); 642 data->common(), data->machine());
643 BinaryOperatorReducer binary_reducer(&graph_reducer, data->graph(),
644 data->common(), data->machine());
642 AddReducer(data, &graph_reducer, &dead_code_elimination); 645 AddReducer(data, &graph_reducer, &dead_code_elimination);
643 AddReducer(data, &graph_reducer, &simple_reducer); 646 AddReducer(data, &graph_reducer, &simple_reducer);
644 AddReducer(data, &graph_reducer, &value_numbering); 647 AddReducer(data, &graph_reducer, &value_numbering);
645 AddReducer(data, &graph_reducer, &machine_reducer); 648 AddReducer(data, &graph_reducer, &machine_reducer);
646 AddReducer(data, &graph_reducer, &common_reducer); 649 AddReducer(data, &graph_reducer, &common_reducer);
650 AddReducer(data, &graph_reducer, &binary_reducer);
647 graph_reducer.ReduceGraph(); 651 graph_reducer.ReduceGraph();
648 } 652 }
649 }; 653 };
650 654
651 655
652 struct ControlFlowOptimizationPhase { 656 struct ControlFlowOptimizationPhase {
653 static const char* phase_name() { return "control flow optimization"; } 657 static const char* phase_name() { return "control flow optimization"; }
654 658
655 void Run(PipelineData* data, Zone* temp_zone) { 659 void Run(PipelineData* data, Zone* temp_zone) {
656 ControlFlowOptimizer optimizer(data->graph(), data->common(), 660 ControlFlowOptimizer optimizer(data->graph(), data->common(),
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 tcf << AsC1VRegisterAllocationData("CodeGen", 1433 tcf << AsC1VRegisterAllocationData("CodeGen",
1430 data->register_allocation_data()); 1434 data->register_allocation_data());
1431 } 1435 }
1432 1436
1433 data->DeleteRegisterAllocationZone(); 1437 data->DeleteRegisterAllocationZone();
1434 } 1438 }
1435 1439
1436 } // namespace compiler 1440 } // namespace compiler
1437 } // namespace internal 1441 } // namespace internal
1438 } // namespace v8 1442 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator-reducer.cc ('k') | test/unittests/compiler/binary-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698