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

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: Addressed comments. 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
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 3b0746e70c5910ce02b0ec411cf95775d6c8d54c..27a75a24c19e5333072d2ddf423d48f6b6f9cbb7 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1145,26 +1145,20 @@ class BlockEntryInstr : public Instruction {
return parallel_move_;
}
- // Discover basic-block structure by performing a recursive 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
- // 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
- // assigned frame-allocated local variables in the block. As a side
- // effect of this function, the set of basic block predecessors (e.g.,
- // block entry instructions of predecessor blocks) and also the last
- // instruction in the block is recorded in each entry instruction.
- void DiscoverBlocks(
+ // Discover basic-block structure of the current block. Must be called
+ // on all graph blocks in preorder to yield valid results. As a side effect,
+ // the block entry instructions in the graph are assigned 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. As a side effect of this
+ // function, the set of basic block predecessors (e.g., block entry
+ // instructions of predecessor blocks) and also the last instruction in the
+ // block is recorded in each entry instruction.
+ bool DiscoverBlock(
Vyacheslav Egorov (Google) 2014/10/09 14:22:19 Please document return value (when it returns true
BlockEntryInstr* predecessor,
GrowableArray<BlockEntryInstr*>* preorder,
- GrowableArray<BlockEntryInstr*>* postorder,
- GrowableArray<intptr_t>* parent,
- intptr_t variable_count,
- intptr_t fixed_parameter_count);
+ GrowableArray<intptr_t>* parent);
// Perform a depth first search to prune code not reachable from an OSR
// entry point.
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698