Commit c3e6048c authored by mtrofin's avatar mtrofin Committed by Commit bot

We can avoid spilling live ranges with spill ranges when we have

sufficient physical registers for all the virtual registers.

This should come in handy for frame elision. There, I noticed that even
for very small functions (==very few virtual registers), because we spill
the context/function marker ranges, we lose the frame elision
opportunity.

There is a subsequent change needed to fully help frame elision -
decoupling spilling of context & function marker from prologue.

BUG=

Review URL: https://codereview.chromium.org/1469743002

Cr-Commit-Position: refs/heads/master@{#32221}
parent 1b1db135
......@@ -2432,7 +2432,8 @@ void LinearScanAllocator::AllocateRegisters() {
DCHECK(active_live_ranges().empty());
DCHECK(inactive_live_ranges().empty());
SplitAndSpillRangesDefinedByMemoryOperand(false);
SplitAndSpillRangesDefinedByMemoryOperand(code()->VirtualRegisterCount() <=
num_allocatable_registers());
for (TopLevelLiveRange* range : data()->live_ranges()) {
if (!CanProcessRange(range)) continue;
......
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