1. 13 May, 2022 1 commit
  2. 23 Feb, 2022 1 commit
    • Jakob Gruber's avatar
      [safepoints] Various refactors · c7e47c30
      Jakob Gruber authored
      A collection of smallish cleanups and improvements for safepoints.
      
      Maintainability:
      - The class names were not very clear; move Safepoint inside
        SafepointTableBuilder to clarify that this wrapper class is used
        during codegen.
      - Rename DefinePointerSlot/DefineRegister to
        DefineTaggedStackSlot/DefineTaggedRegister for clarity.
      - Use named constants instead of -1.
      - DefineTaggedRegister has no connection to kNoDeoptIndex, remove
        the DCHECK and comment.
      - Remove the unused kNumSafepointRegisters constant + other dead code.
      - Small clarifications in CommonFrame::IterateCompiledFrame.
      - Rename has_safepoint_info to uses_safepoint_table and refactor s.t.
        `stack_slots` can be used when `uses_safepoint_table == false`. In
        this case it just returns 0.
      
      Perf:
      - During codegen, represent stack slots as a growable bit vector
        instead of a list of int indices. Extend GrowableBitVector
        functionality to support the above.
      - Track the minimum index instead of iterating all stack slots in
        all safepoints before encoding.
      
      Bug: v8:7700
      Change-Id: If409bc42c825d47fc0074fce51e3b963fd080806
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483659Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79233}
      c7e47c30
  3. 06 Dec, 2021 1 commit
    • Clemens Backes's avatar
      Reland "[codegen] Reduce size of safepoint table fields" · 9c75acec
      Clemens Backes authored
      This is a reland of f68242bc, with
      fixes for UBSan (double-fixed, actually).
      
      Original change's description:
      > [codegen] Reduce size of safepoint table fields
      >
      > Code objects are often small and do not use the full integer range of PC
      > offsets and deoptimization indexes. Reducing the size of these fields to
      > the required size per table reduces the overall size of safepoint tables
      > by roughly 25%.
      >
      > R=jkummerow@chromium.org
      >
      > Bug: v8:12401
      > Change-Id: Ie6889a70782f5510436a1d05d31d17aac0bfec6e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306556
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78216}
      
      Bug: v8:12401
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Change-Id: I2aa7f6448afd3350b0cc3d09a0f4ac18fcab0928
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310806Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78244}
      9c75acec
  4. 02 Dec, 2021 2 commits
  5. 30 Nov, 2021 2 commits
  6. 22 Nov, 2021 1 commit
    • Clemens Backes's avatar
      [codegen] Avoid unused fields in safepoint table · 0580829f
      Clemens Backes authored
      Many safepoint tables do not contain any deoptimization info and/or no
      callee-saved registers. Do not emit empty fields for all entries in this
      case.
      This often shrinks the size of the encoded safepoint table by more than
      50%.
      
      Drive-by cleanups:
      - Rename fields of the safepoint table entries to clarify their meaning
      ("tagged slots" instead of "bits", "tagged register indexes" instead of
       "register bits").
      - Include the PC in the decoded {SafepointEntry} to make it the single
      source of truth.
      
      R=jkummerow@chromium.org
      
      Bug: v8:12401
      Change-Id: If5c24a688a434842ed3b6427f5f1f3ea9232173a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289173Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78021}
      0580829f
  7. 18 Nov, 2021 4 commits
  8. 04 May, 2021 1 commit
  9. 19 Apr, 2021 2 commits
  10. 17 Mar, 2021 2 commits
  11. 15 Mar, 2021 2 commits
  12. 11 Mar, 2021 3 commits
    • Clemens Backes's avatar
      Reland "[no-wasm] Exclude src/wasm from compilation" · 3f9ff062
      Clemens Backes authored
      This is a reland of 80f5dfda. A condition
      in pipeline.cc was inverted, which lead to a CSA verifier error.
      
      Original change's description:
      > [no-wasm] Exclude src/wasm from compilation
      >
      > This is the biggest chunk, including
      > - all of src/wasm,
      > - torque file for wasm objects,
      > - torque file for wasm builtins,
      > - wasm builtins,
      > - wasm runtime functions,
      > - int64 lowering,
      > - simd scala lowering,
      > - WasmGraphBuilder (TF graph construction for wasm),
      > - wasm frame types,
      > - wasm interrupts,
      > - the JSWasmCall opcode,
      > - wasm backing store allocation.
      >
      > Those components are all recursively entangled, so I found no way to
      > split this change up further.
      >
      > Some includes that were recursively included by wasm headers needed to
      > be added explicitly now.
      >
      > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      > because it only tests wasm backing stores. This file is excluded from
      > no-wasm builds then.
      >
      > R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      >
      > Bug: v8:11238
      > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73344}
      
      TBR=jgruber@chromium.org
      
      Bug: v8:11238
      Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
      Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73348}
      3f9ff062
    • Clemens Backes's avatar
      Revert "[no-wasm] Exclude src/wasm from compilation" · 92bc3d38
      Clemens Backes authored
      This reverts commit 80f5dfda.
      
      Reason for revert: Fails CSA verification: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20verify%20csa/21766/overview
      
      Original change's description:
      > [no-wasm] Exclude src/wasm from compilation
      >
      > This is the biggest chunk, including
      > - all of src/wasm,
      > - torque file for wasm objects,
      > - torque file for wasm builtins,
      > - wasm builtins,
      > - wasm runtime functions,
      > - int64 lowering,
      > - simd scala lowering,
      > - WasmGraphBuilder (TF graph construction for wasm),
      > - wasm frame types,
      > - wasm interrupts,
      > - the JSWasmCall opcode,
      > - wasm backing store allocation.
      >
      > Those components are all recursively entangled, so I found no way to
      > split this change up further.
      >
      > Some includes that were recursively included by wasm headers needed to
      > be added explicitly now.
      >
      > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      > because it only tests wasm backing stores. This file is excluded from
      > no-wasm builds then.
      >
      > R=​jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      >
      > Bug: v8:11238
      > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73344}
      
      Bug: v8:11238
      Change-Id: I93672002c1faa36bb0bb5b4a9cc2032ee2ccd814
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752866
      Auto-Submit: Clemens Backes <clemensb@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#73346}
      92bc3d38
    • Clemens Backes's avatar
      [no-wasm] Exclude src/wasm from compilation · 80f5dfda
      Clemens Backes authored
      This is the biggest chunk, including
      - all of src/wasm,
      - torque file for wasm objects,
      - torque file for wasm builtins,
      - wasm builtins,
      - wasm runtime functions,
      - int64 lowering,
      - simd scala lowering,
      - WasmGraphBuilder (TF graph construction for wasm),
      - wasm frame types,
      - wasm interrupts,
      - the JSWasmCall opcode,
      - wasm backing store allocation.
      
      Those components are all recursively entangled, so I found no way to
      split this change up further.
      
      Some includes that were recursively included by wasm headers needed to
      be added explicitly now.
      
      backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      because it only tests wasm backing stores. This file is excluded from
      no-wasm builds then.
      
      R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      
      Bug: v8:11238
      Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73344}
      80f5dfda
  13. 16 Feb, 2021 1 commit
  14. 12 Jan, 2021 1 commit
  15. 02 Dec, 2020 1 commit
  16. 20 Nov, 2020 1 commit
  17. 17 Aug, 2020 1 commit
  18. 14 Jul, 2020 1 commit
    • Jakob Gruber's avatar
      Refactor SafepointTable and create a chokepoint · 130d95ef
      Jakob Gruber authored
      ... on Code objects.
      
      Refactors: create a dedicated WasmCode constructor, hide the internal
      constructor, constify members, and let SafepointTable handle
      out-of-line tables.
      
      Expose a new Code::SafepointTableAddress() helper as the source of
      truth. Some safepoint tables may move out-of-line in the near future.
      
      Bug: v8:7777,v8:10707
      Change-Id: I4e2d954ed2d157235e9dfa3e7a5ca08800896683
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297459Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68837}
      130d95ef
  19. 10 Jul, 2020 1 commit
  20. 30 Jul, 2019 1 commit
    • Georgia Kouveli's avatar
      [arm64] Reduce code size of deoptimization exits · 207d6b35
      Georgia Kouveli authored
      Do not pass the deoptimization index in a register, instead infer it
      from the address we made the deoptimization call from. This makes the
      deoptimization exit sequence one instruction long instead of two.
      
      This requires emitting all deoptimization exits at the end of the
      function in a contiguous block, making sure no constant or veneer
      pools are emitted in between. This means that soft deoptimizations
      require an additional branch to the end of the function, which
      counteracts the removal of the move instruction, however soft
      deoptimizations are rare compared to eager and lazy ones.
      
      This reduces the code size of optimised functions for benchmarks like
      Octane and ARES-6 by about 4%.
      
      Change-Id: I771f9104a07de7931a4bb9c5836e25fb55b1a2a4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714876
      Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62991}
      207d6b35
  21. 21 Jun, 2019 1 commit
  22. 24 May, 2019 2 commits
  23. 23 May, 2019 1 commit
  24. 21 May, 2019 1 commit
  25. 04 Apr, 2019 1 commit
  26. 26 Feb, 2019 1 commit
  27. 13 Feb, 2019 1 commit
  28. 21 Jan, 2019 1 commit
    • Michael Starzinger's avatar
      [wasm] Simplify safepoint-table encoding. · 6091e270
      Michael Starzinger authored
      This removes the unused "argument count" field from the safepoint table
      as the field was unused by now and always contained the value zero.
      
      Also note that associating a callee's argument count with the call-site
      is not compatible with tail-call support. When tail-calling a function
      with a different number of arguments, the information associated with
      the call-site becomes stale. The number of arguments is a property of
      the callee, not of the call-site in the caller. For this reason the
      field in question is not usable to support reference types in function
      arguments (at least when tail-calls are also supported).
      
      R=ahaas@chromium.org
      
      Change-Id: If667d729267f2dd2642b755c54235cc08ca9b141
      Reviewed-on: https://chromium-review.googlesource.com/c/1402548Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58969}
      6091e270
  29. 13 Dec, 2018 1 commit
    • Michael Starzinger's avatar
      [wasm] Allow storing of arguments count in a safepoint. · 366cddfa
      Michael Starzinger authored
      This overlays the "arguments count" and the "deoptimization index"
      fields within a safepoint entry. It allows for a larger value of
      arguments count to be stored in entries that do not contain a
      deoptimization index. Currently the arguments count is unused in
      TurboFan, but it will be used to handle reference type arguments in
      WebAssembly code.
      
      R=ahaas@chromium.org
      BUG=v8:7581
      
      Change-Id: I1e1d5af7e69288f046dc327de5d6e0466fc9ceaf
      Reviewed-on: https://chromium-review.googlesource.com/c/1371829
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58224}
      366cddfa