1. 31 Mar, 2022 1 commit
    • Leszek Swirski's avatar
      [maglev] Add lazy deopts · 0df9606d
      Leszek Swirski authored
      Nodes can now hold a LazyDeoptSafepoint which stores the frame state in
      case they trigger a lazy deopt. OpProperties have a new CanLazyDeopt
      bit, and codegen emits a safepoint table entry + lazy deopt for all
      nodes with this bit. Also, we now check the deoptimized code bit on
      entry into the maglev compiled function.
      
      An example use of these lazy deopts is added as a PropertyCell fast path
      for LdaGlobal, which adds a code dependency on the property cell.
      
      Bug: v8:7700
      Change-Id: I663db38dfa7325d38fc6d5f079d263a958074e36
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557251Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79688}
      0df9606d
  2. 30 Mar, 2022 2 commits
  3. 29 Mar, 2022 1 commit
  4. 24 Mar, 2022 1 commit
    • Leszek Swirski's avatar
      [maglev] Remove diff encoding of checkpoints · 7b3ede33
      Leszek Swirski authored
      Remove StoreToFrame and the general diff encoding for checkpoints, and
      instead make all Checkpoints immediately copy the live part of the
      interpreter frame state.
      
      This means that we don't need to recreate the frame state during graph
      processing, and we don't have to copy the checkpoint's state for storing
      in the deferred DeoptimizationInfo.
      
      In theory the diff encoding was meant to save zone memory for unused
      checkpoints, and for checkpoints that don't differ much from each other.
      However,
      
        a) We expect to do most checkpoint elimination during graph building,
           so the assumption that many checkpoints will be unused seems less
           probable, and
      
        b) We need to copy the checkpoint's frame state for emitting deopts,
           so we don't actually end up avoiding doing the copies.
      
      So, we can simplify things by removing this complexity.
      
      Bug: v8:7700
      Change-Id: Iff9743fabbf7a017cccf0ece76a797c571764ea6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545178Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79602}
      7b3ede33
  5. 23 Mar, 2022 1 commit
  6. 21 Mar, 2022 1 commit
    • Victor Gomes's avatar
      [maglev] Use virtual accumulator slot in frame array · 857b33f5
      Victor Gomes authored
      During a frame merge we call ForEachValue that "get"s every
      live register, including the virtual accumulator. That currently
      fails since we need to check if the register is the virtual
      accumulator and set/get the accumulator field in InterpreterFrameState.
      
      The virtual accumulator slot in RegisterFrameArray (the same as the
      return address in a live frame) is actually unused.
      So we can use this slot for the InterpreterFrameState's accumulator,
      instead of a separate field.
      
      Bug: v8:7700
      Change-Id: Ife33946a4f9c58ca1f4eadeb587f9880f6fb2afc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3536648
      Auto-Submit: Victor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79553}
      857b33f5
  7. 16 Mar, 2022 1 commit
  8. 14 Mar, 2022 1 commit
  9. 10 Mar, 2022 1 commit
    • 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
  10. 09 Mar, 2022 1 commit
  11. 07 Mar, 2022 1 commit
  12. 03 Mar, 2022 1 commit
    • Leszek Swirski's avatar
      [maglev] Use RegList for free registers · 31abbcfb
      Leszek Swirski authored
      Store the free registers as a RegList rather than stack of Register
      values. This allows us to simplify some of the register freeing logic,
      including passing the current free set to nodes for use as temporaries.
      
      Drive-by: Replace ALWAYS_ALLOCATABLE_GENERAL_REGISTERS with
      ALLOCATABLE_GENERAL_REGISTERS, which is the more general list (the former
      is an implementation detail for optionally reserving a register for
      the cage register).
      
      Bug: v8:7700
      Change-Id: I666e9a7547c2f4f4e578fbcbb4bd3fe3cb06dac5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497767Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79344}
      31abbcfb
  13. 24 Feb, 2022 1 commit