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

Side by Side Diff: test/unittests/compiler/control-reducer-unittest.cc

Issue 1122423003: [turbofan] Add support for advanced reducers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move comment Created 5 years, 7 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/control-reducer.h" 5 #include "src/compiler/control-reducer.h"
6 #include "src/compiler/diamond.h" 6 #include "src/compiler/diamond.h"
7 #include "src/compiler/graph-visualizer.h" 7 #include "src/compiler/graph-visualizer.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 23 matching lines...) Expand all
34 MachineOperatorBuilder machine_; 34 MachineOperatorBuilder machine_;
35 JSOperatorBuilder javascript_; 35 JSOperatorBuilder javascript_;
36 JSGraph jsgraph_; 36 JSGraph jsgraph_;
37 37
38 void ReduceGraph(int max_phis_for_select = 0) { 38 void ReduceGraph(int max_phis_for_select = 0) {
39 if (FLAG_trace_turbo_graph) { 39 if (FLAG_trace_turbo_graph) {
40 OFStream os(stdout); 40 OFStream os(stdout);
41 os << "-- Graph before control reduction" << std::endl; 41 os << "-- Graph before control reduction" << std::endl;
42 os << AsRPO(*graph()); 42 os << AsRPO(*graph());
43 } 43 }
44 ControlReducer::ReduceGraph(zone(), jsgraph(), common(), 44 ControlReducer::ReduceGraph(zone(), jsgraph(), max_phis_for_select);
45 max_phis_for_select);
46 if (FLAG_trace_turbo_graph) { 45 if (FLAG_trace_turbo_graph) {
47 OFStream os(stdout); 46 OFStream os(stdout);
48 os << "-- Graph after control reduction" << std::endl; 47 os << "-- Graph after control reduction" << std::endl;
49 os << AsRPO(*graph()); 48 os << AsRPO(*graph());
50 } 49 }
51 } 50 }
52 51
53 JSGraph* jsgraph() { return &jsgraph_; } 52 JSGraph* jsgraph() { return &jsgraph_; }
54 }; 53 };
55 54
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 IsSelect(kType, p0, IsInt32Constant(1), IsInt32Constant(2)), 345 IsSelect(kType, p0, IsInt32Constant(1), IsInt32Constant(2)),
347 IsSelect(kType, p0, IsInt32Constant(2), IsInt32Constant(3))), 346 IsSelect(kType, p0, IsInt32Constant(2), IsInt32Constant(3))),
348 graph()->start(), graph()->start())); 347 graph()->start(), graph()->start()));
349 EXPECT_THAT(graph()->end(), IsEnd(ret)); 348 EXPECT_THAT(graph()->end(), IsEnd(ret));
350 } 349 }
351 350
352 351
353 } // namespace compiler 352 } // namespace compiler
354 } // namespace internal 353 } // namespace internal
355 } // namespace v8 354 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-control-reducer.cc ('k') | test/unittests/compiler/graph-reducer-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698