Skip to content

Commit 10741ed

Browse files
mralephCommit Queue
authored andcommitted
[vm/compiler] Let ResolveControlFlow handle spill slot moves
There is no need to manually add a move on entry to the try. TEST=ci Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try Change-Id: I3720b1dd5b089b22d68d87274f1e3a7814bbd0e5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409141 Commit-Queue: Slava Egorov <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 35d0a9c commit 10741ed

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

runtime/vm/compiler/backend/linearscan.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,10 +3091,6 @@ void FlowGraphAllocator::AllocateUnallocatedRanges() {
30913091
if (dst.IsRegister() || dst.IsFpuRegister()) {
30923092
if (range->spill_slot().IsInvalid()) {
30933093
AllocateSpillSlotFor(range);
3094-
auto try_entry = catch_entry->PredecessorAt(0)->AsTryEntry();
3095-
auto try_body = try_entry->try_body();
3096-
AddMoveAt(try_body->start_pos() + 1, range->spill_slot(),
3097-
range->assigned_location());
30983094
}
30993095
}
31003096
}
@@ -3357,6 +3353,12 @@ void FlowGraphAllocator::ResolveControlFlow() {
33573353
}
33583354
}
33593355
} else {
3356+
TRACE_ALLOC(THR_Print("inserting eager spill to %s at %" Pd
3357+
" for range v%" Pd " allocated to %s\n",
3358+
range->spill_slot().ToCString(),
3359+
range->Start() + 1, range->vreg(),
3360+
range->assigned_location().ToCString()));
3361+
33603362
AddMoveAt(range->Start() + 1, range->spill_slot(),
33613363
range->assigned_location());
33623364
}

0 commit comments

Comments
 (0)