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

Unified Diff: runtime/vm/intermediate_language.h

Issue 617933003: Iterative graph traversal in FlowGraph::DiscoverBlocks() (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index c99d69bf9c3c4604060688445e0404b298c666cf..4a04ab896231325e7099b26c92ae95a3eb3aa2e2 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -20,6 +20,7 @@ DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
class BitVector;
class BlockEntryInstr;
+class BlockEntryEdge;
class BoxIntNInstr;
class BufferFormatter;
class CatchBlockEntryInstr;
@@ -1137,12 +1138,11 @@ class BlockEntryInstr : public Instruction {
return parallel_move_;
}
- // Discover basic-block structure by performing a recursive depth first
+ // Discover basic-block structure by performing an iterative depth first
// traversal of the instruction graph reachable from this instruction. As
// a side effect, the block entry instructions in the graph are assigned
- // numbers in both preorder and postorder. The array 'preorder' maps
- // preorder block numbers to the block entry instruction with that number
- // and analogously for the array 'postorder'. The depth first spanning
+ // preorder numbers. The array 'preorder' maps preorder block numbers to
+ // the block entry instruction with that number. The depth first spanning
// tree is recorded in the array 'parent', which maps preorder block
// numbers to the preorder number of the block's spanning-tree parent.
// The array 'assigned_vars' maps preorder block numbers to the set of
@@ -1153,10 +1153,8 @@ class BlockEntryInstr : public Instruction {
void DiscoverBlocks(
BlockEntryInstr* predecessor,
GrowableArray<BlockEntryInstr*>* preorder,
- GrowableArray<BlockEntryInstr*>* postorder,
GrowableArray<intptr_t>* parent,
- intptr_t variable_count,
- intptr_t fixed_parameter_count);
+ GrowableArray<BlockEntryEdge>* block_stack);
// Perform a depth first search to prune code not reachable from an OSR
// entry point.

Powered by Google App Engine
This is Rietveld 408576698