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

Unified Diff: runtime/vm/compiler.cc

Issue 10696151: Skeleton of a linear scan register allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 8 years, 5 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 | runtime/vm/flow_graph_allocator.h » ('j') | runtime/vm/flow_graph_allocator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index e4d046eac32f27c8cc50261182cdb7955fb7a5df..6e7923f510701c6574c8cd040fbb1b3545986165 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -17,6 +17,7 @@
#include "vm/flow_graph_builder.h"
#include "vm/flow_graph_compiler.h"
#include "vm/flow_graph_optimizer.h"
+#include "vm/il_printer.h"
#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
@@ -168,13 +169,8 @@ static bool CompileParsedFunctionHelper(
if (use_ssa) {
// Perform register allocation on the SSA graph.
- FlowGraphAllocator allocator(graph_builder.postorder_block_entries(),
- graph_builder.current_ssa_temp_index());
- allocator.ResolveConstraints();
- allocator.AnalyzeLiveness();
-
- // Temporary bailout until we support code generation from SSA form.
- graph_builder.Bailout("No SSA code generation support.");
+ FlowGraphAllocator allocator(block_order, &graph_builder);
+ allocator.AllocateRegisters();
}
}
}
@@ -186,8 +182,12 @@ static bool CompileParsedFunctionHelper(
is_leaf = analyzer.is_leaf();
}
Assembler assembler;
- FlowGraphCompiler graph_compiler(&assembler, parsed_function,
- block_order, optimized, is_leaf);
+ FlowGraphCompiler graph_compiler(&assembler,
+ parsed_function,
+ block_order,
+ optimized,
+ optimized && use_ssa,
+ is_leaf);
{
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphcompiler_timer,
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.h » ('j') | runtime/vm/flow_graph_allocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698