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

Unified Diff: runtime/vm/flow_graph.cc

Issue 215363004: Support for multiple register values (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.h » ('j') | runtime/vm/intermediate_language.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 98a774ba959d34490aafbb61b4990beaace9bcbb..bd24cf64e936e18d55d3f3816f4ae1189cf52322 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -115,7 +115,11 @@ void FlowGraph::InsertAfter(Instruction* prev,
Definition::UseKind use_kind) {
if (use_kind == Definition::kValue) {
ASSERT(instr->IsDefinition());
- instr->AsDefinition()->set_ssa_temp_index(alloc_ssa_temp_index());
+ Definition* defn = instr->AsDefinition();
+ defn->set_ssa_temp_index(alloc_ssa_temp_index());
+ if (defn->RequiresTwoSSATempIndexes()) {
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index());
Vyacheslav Egorov (Google) 2014/04/03 18:10:09 I am not sure I like the naming here.
Cutch 2014/04/03 18:35:07 I've renamed it to pair_ssa_index. I don't really
+ }
}
instr->InsertAfter(prev);
ASSERT(instr->env() == NULL);
@@ -129,7 +133,11 @@ Instruction* FlowGraph::AppendTo(Instruction* prev,
Definition::UseKind use_kind) {
if (use_kind == Definition::kValue) {
ASSERT(instr->IsDefinition());
- instr->AsDefinition()->set_ssa_temp_index(alloc_ssa_temp_index());
+ Definition* defn = instr->AsDefinition();
+ defn->set_ssa_temp_index(alloc_ssa_temp_index());
+ if (defn->RequiresTwoSSATempIndexes()) {
Vyacheslav Egorov (Google) 2014/04/03 18:10:09 The code is duplicated in multiple places. I wonde
Cutch 2014/04/03 18:35:07 Done. Added the following to FlowGraph: void Assi
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index());
+ }
}
ASSERT(instr->env() == NULL);
if (env != NULL) env->DeepCopyTo(instr);
@@ -717,6 +725,9 @@ void FlowGraph::Rename(GrowableArray<PhiInstr*>* live_phis,
for (intptr_t i = 0; i < parameter_count(); ++i) {
Definition* defn = (*inlining_parameters)[i];
defn->set_ssa_temp_index(alloc_ssa_temp_index()); // New SSA temp.
+ if (defn->RequiresTwoSSATempIndexes()) {
+ defn->set_ssa_temp_index2(alloc_ssa_temp_index());
+ }
AddToInitialDefinitions(defn);
env.Add(defn);
}
@@ -927,6 +938,9 @@ void FlowGraph::RenameRecursive(BlockEntryInstr* block_entry,
if (definition->is_used()) {
// Assign fresh SSA temporary and update expression stack.
definition->set_ssa_temp_index(alloc_ssa_temp_index());
+ if (definition->RequiresTwoSSATempIndexes()) {
+ definition->set_ssa_temp_index2(alloc_ssa_temp_index());
+ }
env->Add(definition);
}
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.h » ('j') | runtime/vm/intermediate_language.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698