Commit 9e074945 authored by georgia.kouveli's avatar georgia.kouveli Committed by Commit bot

[turbofan] Try to allocate preferred register after splitting range.

This shows an improvement in the code size of the bytecode handlers.
When a range is split (because for example the preferred register gets
clobbered by a call and is not available for the whole range), trying
to allocate the preferred register for the first range that results
from the split avoids some extra register moves.

BUG=

Review-Url: https://codereview.chromium.org/2749023005
Cr-Commit-Position: refs/heads/master@{#43905}
parent 94efcfe0
......@@ -3152,6 +3152,9 @@ bool LinearScanAllocator::TryAllocateFreeReg(
// the range end. Split current at position where it becomes blocked.
LiveRange* tail = SplitRangeAt(current, pos);
AddToUnhandledSorted(tail);
// Try to allocate preferred register once more.
if (TryAllocatePreferredReg(current, free_until_pos)) return true;
}
// Register reg is available at the range start and is free until the range
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment