Reviewers: dcarney,

Message:
Small fix.

Looking into adding testcases for live ranges.

Description:
LiveRange splitting at interval boundary fix.

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

BUG=

Please review this at https://codereview.chromium.org/1102243002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -1 lines):
  M src/compiler/register-allocator.cc


Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc index 28007d47fa11aadc60c0781e3793d76a13d39880..55023a200a4d9287c17f255c270de908667349cb 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -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.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to