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

Unified Diff: runtime/vm/flow_graph_compiler_x64.h

Issue 9719003: Compute preorder as well as postorder basic block orderings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/flow_graph_compiler_x64.h
diff --git a/runtime/vm/flow_graph_compiler_x64.h b/runtime/vm/flow_graph_compiler_x64.h
index e363737bc2b9b83d2febe84b62b1caf3359c1315..9cd6c3cd935738db948e90cd370213d4fb0cb4b9 100644
--- a/runtime/vm/flow_graph_compiler_x64.h
+++ b/runtime/vm/flow_graph_compiler_x64.h
@@ -23,7 +23,7 @@ class FlowGraphCompiler : public FlowGraphVisitor {
public:
FlowGraphCompiler(Assembler* assembler,
const ParsedFunction& parsed_function,
- const GrowableArray<BlockEntryInstr*>* blocks);
+ const GrowableArray<BlockEntryInstr*>& block_order);
virtual ~FlowGraphCompiler();
@@ -47,7 +47,7 @@ class FlowGraphCompiler : public FlowGraphVisitor {
// Bail out of the flow graph compiler. Does not return to the caller.
void Bailout(const char* reason);
- virtual void VisitBlocks(const GrowableArray<BlockEntryInstr*>& blocks);
+ virtual void VisitBlocks();
// Emit code to perform a computation, leaving its value in RAX.
#define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \
@@ -103,10 +103,10 @@ class FlowGraphCompiler : public FlowGraphVisitor {
Assembler* assembler_;
const ParsedFunction& parsed_function_;
- const GrowableArray<BlockEntryInstr*>* blocks_;
- // Compiler specific per-block state. Indexed by block number, so not
- // necessarily the same order as the array of blocks.
+ // Compiler specific per-block state. Indexed by postorder block number
+ // for convenience. This is not the block's index in the block order,
+ // which is reverse postorder.
GrowableArray<BlockInfo*> block_info_;
BlockEntryInstr* current_block_;

Powered by Google App Engine
This is Rietveld 408576698