Commit 1a12a8a6 authored by mtrofin's avatar mtrofin Committed by Commit bot

[turbofan] LiveRange splitting at interval boundary fix.

When splitting live ranges between interval boundary,
the intervals still link eachother. This fixes that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28053}
parent 32157c25
......@@ -357,6 +357,8 @@ void LiveRange::SplitAt(LifetimePosition position, LiveRange* result,
auto next = current->next();
if (next->start() >= position) {
split_at_start = (next->start() == position);
after = next;
current->set_next(nullptr);
break;
}
current = next;
......@@ -364,7 +366,6 @@ void LiveRange::SplitAt(LifetimePosition position, LiveRange* result,
// Partition original use intervals to the two live ranges.
auto before = current;
if (after == nullptr) after = before->next();
result->last_interval_ =
(last_interval_ == before)
? after // Only interval in the range after split.
......
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