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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 17315006: Scale the OSR optimization threshold by loop nesting depth. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 2ae1401abc08ec4d64ad838db0b2845bdfd06555..3afcb093fab2cc8b88f0e3babf6ceb0bbe2d1835 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -120,6 +120,10 @@ class FlowGraphBuilder: public ValueObject {
void set_context_level(intptr_t value) { context_level_ = value; }
intptr_t context_level() const { return context_level_; }
+ void IncrementLoopDepth() { ++loop_depth_; }
+ void DecrementLoopDepth() { --loop_depth_; }
+ intptr_t loop_depth() const { return loop_depth_; }
+
// Each try in this function gets its own try index.
intptr_t AllocateTryIndex() { return ++last_used_try_index_; }
@@ -169,6 +173,7 @@ class FlowGraphBuilder: public ValueObject {
intptr_t context_level_;
intptr_t last_used_try_index_;
intptr_t try_index_;
+ intptr_t loop_depth_;
GraphEntryInstr* graph_entry_;
// Outgoing argument stack height.
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698