• Leszek Swirski's avatar
    [maglev] Use free list for iterating used registers · 0504331b
    Leszek Swirski authored
    Don't rely on register_values[index] == nullptr for checking if a
    register is free, but instead re-use the free register list, and iterate
    the allocatable_register & ~free_register list when iterating used
    registers.
    
    This also changes the indexing of register_values to be by register
    code, not allocatable register index. The register state stored on the
    InterpreterFrameState, however, stays compact (allocatable register
    count). A new wrapper class + iterator keeps iteration over it and the
    register_values array in sync.
    
    Bug: v8:7700
    Change-Id: I7815aa2d4a1f7b7ebafaaafe0727219adcc4dcfe
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3512792
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79434}
    0504331b
maglev-regalloc-data.h 2.49 KB