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

Side by Side Diff: src/compiler/control-flow-optimizer.h

Issue 931623002: [turbofan] Optimize certain chains of Branch into a Switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addrssed comments. Created 5 years, 10 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 | « src/compiler/common-operator.cc ('k') | src/compiler/control-flow-optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_CONTROL_FLOW_OPTIMIZER_H_
6 #define V8_COMPILER_CONTROL_FLOW_OPTIMIZER_H_
7
8 #include "src/compiler/node-marker.h"
9 #include "src/zone-containers.h"
10
11 namespace v8 {
12 namespace internal {
13 namespace compiler {
14
15 // Forward declarations.
16 class CommonOperatorBuilder;
17 class Graph;
18 class JSGraph;
19 class MachineOperatorBuilder;
20 class Node;
21
22
23 class ControlFlowOptimizer FINAL {
24 public:
25 ControlFlowOptimizer(JSGraph* jsgraph, Zone* zone);
26
27 void Optimize();
28
29 private:
30 void Enqueue(Node* node);
31 void VisitNode(Node* node);
32 void VisitBranch(Node* node);
33
34 CommonOperatorBuilder* common() const;
35 Graph* graph() const;
36 JSGraph* jsgraph() const { return jsgraph_; }
37 MachineOperatorBuilder* machine() const;
38 Zone* zone() const { return zone_; }
39
40 JSGraph* const jsgraph_;
41 ZoneQueue<Node*> queue_;
42 NodeMarker<bool> queued_;
43 Zone* const zone_;
44
45 DISALLOW_COPY_AND_ASSIGN(ControlFlowOptimizer);
46 };
47
48 } // namespace compiler
49 } // namespace internal
50 } // namespace v8
51
52 #endif // V8_COMPILER_CONTROL_FLOW_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/control-flow-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698