Commit 6d80e612 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[regalloc] Stop search for intersections earlier

When looking for intersections between the current range and inactive
range, we can stop the search as soon as the inactive range's next start
is past the current range's end position. We know that subsequent
inactive ranges cannot intersect either, because they are ordered by
their next start.

R=sigurds@chromium.org

Bug: chromium:986862
Change-Id: I249a781be281abc7b438f31848f5d6cb3a25303f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821434Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73932}
parent 41fb9f97
......@@ -3958,7 +3958,8 @@ void LinearScanAllocator::FindFreeRegistersForRange(
// interesting to this range anyway.
// TODO(mtrofin): extend to aliased ranges, too.
if ((kSimpleFPAliasing || !check_fp_aliasing()) &&
positions[cur_reg] <= cur_inactive->NextStart()) {
(positions[cur_reg] <= cur_inactive->NextStart() ||
range->End() <= cur_inactive->NextStart())) {
break;
}
LifetimePosition next_intersection =
......
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