• Thibaud Michaud's avatar
    [regalloc] Reuse existing method to find intersection · 9c378dad
    Thibaud Michaud authored
    The current code for AssignRegisterOnReload starts the search at
    the first interval instead of relying on the cached {current_interval_},
    which seems to be a main cause for slow compile time in the linked
    issue's test case. Moreover, it does not take into account live range
    holes of the current range. This change uses FirstIntersection instead
    which already handles both issues.
    Since inactive ranges are sorted by their next start, we can also break
    early from the loop.
    
    R=sigurds@chromium.org
    
    Bug: v8:10533
    Change-Id: I454df95376011462ce22e850a1c143d523b68538
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2263152
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68551}
    9c378dad
register-allocator.cc 205 KB