| Index: src/compiler/register-allocator.cc
|
| diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
|
| index cccf967227e8be2b2c77ad090a5cf233884991a2..4efa63d3835702189a4ddeb1110fcd50f6f1718d 100644
|
| --- a/src/compiler/register-allocator.cc
|
| +++ b/src/compiler/register-allocator.cc
|
| @@ -3162,21 +3162,14 @@ void SpillSlotLocator::LocateSpillSlots() {
|
| for (TopLevelLiveRange* range : data()->live_ranges()) {
|
| if (range == nullptr || range->IsEmpty()) continue;
|
| // We care only about ranges which spill in the frame.
|
| - if (!range->HasSpillRange()) continue;
|
| - if (range->IsSpilledOnlyInDeferredBlocks()) {
|
| - for (LiveRange* child = range; child != nullptr; child = child->next()) {
|
| - if (child->spilled()) {
|
| - code->GetInstructionBlock(child->Start().ToInstructionIndex())
|
| - ->mark_needs_frame();
|
| - }
|
| - }
|
| - } else {
|
| - TopLevelLiveRange::SpillMoveInsertionList* spills =
|
| - range->GetSpillMoveInsertionLocations();
|
| - DCHECK_NOT_NULL(spills);
|
| - for (; spills != nullptr; spills = spills->next) {
|
| - code->GetInstructionBlock(spills->gap_index)->mark_needs_frame();
|
| - }
|
| + if (!range->HasSpillRange() || range->IsSpilledOnlyInDeferredBlocks()) {
|
| + continue;
|
| + }
|
| + TopLevelLiveRange::SpillMoveInsertionList* spills =
|
| + range->GetSpillMoveInsertionLocations();
|
| + DCHECK_NOT_NULL(spills);
|
| + for (; spills != nullptr; spills = spills->next) {
|
| + code->GetInstructionBlock(spills->gap_index)->mark_needs_frame();
|
| }
|
| }
|
| }
|
| @@ -3639,7 +3632,7 @@ void LiveRangeConnector::CommitSpillsInDeferredBlocks(
|
| worklist.pop();
|
| if (done_blocks.Contains(block_id)) continue;
|
| done_blocks.Add(block_id);
|
| - const InstructionBlock* spill_block =
|
| + InstructionBlock* spill_block =
|
| code->InstructionBlockAt(RpoNumber::FromInt(block_id));
|
|
|
| for (const RpoNumber& pred : spill_block->predecessors()) {
|
| @@ -3659,6 +3652,7 @@ void LiveRangeConnector::CommitSpillsInDeferredBlocks(
|
| data()->AddGapMove(spill_block->first_instruction_index(),
|
| Instruction::GapPosition::START, pred_op,
|
| spill_operand);
|
| + spill_block->mark_needs_frame();
|
| }
|
| }
|
| }
|
|
|