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

[turbofan] Greedy: small fix in groupping algo.

This is a performance bug, not a functional bug: we were
losing grouping opportunities.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30776}
parent 15e7897b
......@@ -178,6 +178,7 @@ void GreedyAllocator::PreallocateFixedRanges() {
void GreedyAllocator::GroupLiveRanges() {
CoalescedLiveRanges groupper(local_zone());
for (TopLevelLiveRange* range : data()->live_ranges()) {
groupper.clear();
// Skip splinters, because we do not want to optimize for them, and moves
// due to assigning them to different registers occur in deferred blocks.
if (!CanProcessRange(range) || range->IsSplinter() || !range->is_phi()) {
......@@ -196,7 +197,6 @@ void GreedyAllocator::GroupLiveRanges() {
// Populate the groupper.
if (range->group() == nullptr) {
groupper.clear();
groupper.AllocateRange(range);
} else {
for (LiveRange* member : range->group()->ranges()) {
......
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