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

Unified Diff: src/compiler/loop-analysis.h

Issue 855653002: [turbofan] Improve loop analysis to handle more than 32 loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/loop-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/loop-analysis.h
diff --git a/src/compiler/loop-analysis.h b/src/compiler/loop-analysis.h
index 8c8d19ac690ebc30231fe662b11a4c8b149b70a2..030c93d0ead6e0f7f4c003a5324fdf5017e73080 100644
--- a/src/compiler/loop-analysis.h
+++ b/src/compiler/loop-analysis.h
@@ -25,7 +25,7 @@ class LoopTree : public ZoneObject {
: zone_(zone),
outer_loops_(zone),
all_loops_(zone),
- node_to_loop_num_(static_cast<int>(num_nodes), 0, zone),
+ node_to_loop_num_(static_cast<int>(num_nodes), -1, zone),
loop_nodes_(zone) {}
// Represents a loop in the tree of loops, including the header nodes,
@@ -61,7 +61,7 @@ class LoopTree : public ZoneObject {
Loop* ContainingLoop(Node* node) {
if (node->id() >= static_cast<int>(node_to_loop_num_.size()))
return nullptr;
- uint8_t num = node_to_loop_num_[node->id()];
+ int num = node_to_loop_num_[node->id()];
return num > 0 ? &all_loops_[num - 1] : nullptr;
}
@@ -116,8 +116,7 @@ class LoopTree : public ZoneObject {
Zone* zone_;
ZoneVector<Loop*> outer_loops_;
ZoneVector<Loop> all_loops_;
- // TODO(titzer): lift loop count restriction.
- ZoneVector<uint8_t> node_to_loop_num_;
+ ZoneVector<int> node_to_loop_num_;
ZoneVector<Node*> loop_nodes_;
};
« 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