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

Side by Side Diff: src/compiler/loop-analysis.h

Issue 1052753004: [turbofan] Rework handling of loop exits in loop peeling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/compiler/loop-analysis.cc » ('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 #ifndef V8_COMPILER_LOOP_ANALYSIS_H_ 5 #ifndef V8_COMPILER_LOOP_ANALYSIS_H_
6 #define V8_COMPILER_LOOP_ANALYSIS_H_ 6 #define V8_COMPILER_LOOP_ANALYSIS_H_
7 7
8 #include "src/base/iterator.h" 8 #include "src/base/iterator.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
11 #include "src/zone-containers.h" 11 #include "src/zone-containers.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 namespace compiler { 15 namespace compiler {
16 16
17 // TODO(titzer): don't assume entry edges have a particular index.
18 static const int kAssumedLoopEntryIndex = 0; // assume loops are entered here.
19
17 class LoopFinderImpl; 20 class LoopFinderImpl;
18 21
19 typedef base::iterator_range<Node**> NodeRange; 22 typedef base::iterator_range<Node**> NodeRange;
20 23
21 // Represents a tree of loops in a graph. 24 // Represents a tree of loops in a graph.
22 class LoopTree : public ZoneObject { 25 class LoopTree : public ZoneObject {
23 public: 26 public:
24 LoopTree(size_t num_nodes, Zone* zone) 27 LoopTree(size_t num_nodes, Zone* zone)
25 : zone_(zone), 28 : zone_(zone),
26 outer_loops_(zone), 29 outer_loops_(zone),
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 136 }
134 } 137 }
135 138
136 Zone* zone_; 139 Zone* zone_;
137 ZoneVector<Loop*> outer_loops_; 140 ZoneVector<Loop*> outer_loops_;
138 ZoneVector<Loop> all_loops_; 141 ZoneVector<Loop> all_loops_;
139 ZoneVector<int> node_to_loop_num_; 142 ZoneVector<int> node_to_loop_num_;
140 ZoneVector<Node*> loop_nodes_; 143 ZoneVector<Node*> loop_nodes_;
141 }; 144 };
142 145
143
144 class LoopFinder { 146 class LoopFinder {
145 public: 147 public:
146 // Build a loop tree for the entire graph. 148 // Build a loop tree for the entire graph.
147 static LoopTree* BuildLoopTree(Graph* graph, Zone* temp_zone); 149 static LoopTree* BuildLoopTree(Graph* graph, Zone* temp_zone);
148 }; 150 };
149 151
150 152
151 } // namespace compiler 153 } // namespace compiler
152 } // namespace internal 154 } // namespace internal
153 } // namespace v8 155 } // namespace v8
154 156
155 #endif // V8_COMPILER_LOOP_ANALYSIS_H_ 157 #endif // V8_COMPILER_LOOP_ANALYSIS_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/loop-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698