Index: src/compiler/register-allocator.cc |
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc |
index 7b2caff60ce993125c3c877c3e92b2bd6a5ddc29..eb7b6b90d32d7048d3bfd0034145eb183ccd6732 100644 |
--- a/src/compiler/register-allocator.cc |
+++ b/src/compiler/register-allocator.cc |
@@ -2690,6 +2690,25 @@ bool GreedyAllocator::AllocateBlockedRange( |
} |
+SpillSlotLocator::SpillSlotLocator(RegisterAllocationData* data) |
+ : data_(data) {} |
+ |
+ |
+void SpillSlotLocator::LocateSpillSlots() { |
+ auto code = data()->code(); |
+ for (auto range : data()->live_ranges()) { |
+ if (range == nullptr || range->IsEmpty() || range->IsChild()) continue; |
+ // We care only about ranges which spill in the frame. |
+ if (!range->HasSpillRange()) continue; |
+ auto spills = range->spills_at_definition(); |
+ DCHECK_NOT_NULL(spills); |
+ for (; spills != nullptr; spills = spills->next) { |
+ code->GetInstructionBlock(spills->gap_index)->mark_needs_frame(); |
+ } |
+ } |
+} |
+ |
+ |
OperandAssigner::OperandAssigner(RegisterAllocationData* data) : data_(data) {} |