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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 207063002: Refactor to support multiple outputs in location summary (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_compiler.cc » ('j') | runtime/vm/intermediate_language.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index cce24b94c5b4ac276ab46e02509cd1d2d4054a0b..86c54fd40fe925973979e75e189f5a6bc768d90d 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -858,7 +858,7 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
// Drop definitions of constants that have no uses.
if ((range == NULL) || (range->first_use() == NULL)) {
- locs->set_out(Location::NoLocation());
+ locs->set_out(0, Location::NoLocation());
return;
}
@@ -873,7 +873,7 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
range->finger()->Initialize(range);
ConvertAllUses(range);
- locs->set_out(Location::NoLocation());
+ locs->set_out(0, Location::NoLocation());
return;
}
}
@@ -886,15 +886,15 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
// Normalize same-as-first-input output if input is specified as
// fixed register.
- if (locs->out().IsUnallocated() &&
- (locs->out().policy() == Location::kSameAsFirstInput) &&
+ if (locs->out(0).IsUnallocated() &&
+ (locs->out(0).policy() == Location::kSameAsFirstInput) &&
(locs->in(0).IsMachineRegister())) {
- locs->set_out(locs->in(0));
+ locs->set_out(0, locs->in(0));
}
const bool output_same_as_first_input =
- locs->out().IsUnallocated() &&
- (locs->out().policy() == Location::kSameAsFirstInput);
+ locs->out(0).IsUnallocated() &&
+ (locs->out(0).policy() == Location::kSameAsFirstInput);
// Add uses from the deoptimization environment.
if (current->env() != NULL) ProcessEnvironmentUses(block, current);
@@ -1017,7 +1017,7 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
ASSERT(!locs->in(j).IsUnallocated());
}
- ASSERT(!locs->out().IsUnallocated());
+ ASSERT(!locs->out(0).IsUnallocated());
#endif
}
@@ -1026,11 +1026,11 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
}
if (def == NULL) {
- ASSERT(locs->out().IsInvalid());
+ ASSERT(locs->out(0).IsInvalid());
return;
}
- if (locs->out().IsInvalid()) {
+ if (locs->out(0).IsInvalid()) {
ASSERT(def->ssa_temp_index() < 0);
return;
}
@@ -1040,7 +1040,7 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
LiveRange* range = (def->ssa_temp_index() >= 0) ?
GetLiveRange(def->ssa_temp_index()) :
MakeLiveRangeForTemporary();
- Location* out = locs->out_slot();
+ Location* out = locs->out_slot(0);
// Process output and finalize its liverange.
if (out->IsMachineRegister()) {
@@ -1090,7 +1090,7 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
locs->in(0).Equals(Location::RequiresFpuRegister()));
// Create move that will copy value between input and output.
- locs->set_out(Location::RequiresRegister());
+ locs->set_out(0, Location::RequiresRegister());
MoveOperands* move = AddMoveAt(pos,
Location::RequiresRegister(),
Location::Any());
@@ -1121,8 +1121,8 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
// i i'
// output [-------
//
- ASSERT(locs->out().Equals(Location::RequiresRegister()) ||
- locs->out().Equals(Location::RequiresFpuRegister()));
+ ASSERT(locs->out(0).Equals(Location::RequiresRegister()) ||
+ locs->out(0).Equals(Location::RequiresFpuRegister()));
// Shorten live range to the point of definition and add use to be filled by
// allocator.
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/intermediate_language.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698