1. 05 Mar, 2021 2 commits
    • Bill Budge's avatar
      Reland "[compiler][linkage] No allocation of slots after aligning a frame" · 13568594
      Bill Budge authored
      This is a reland of b18bc221
      
      It is unchanged, so:
      TBR=jgruber@chromium.org, georgia.kouveli@arm.com
      
      Original change's description:
      > [compiler][linkage] No allocation of slots after aligning a frame
      >
      > - Adds DCHECKs to make sure no stack slots are allocated after
      >   aligning a frame.
      > - Changes Arm64 CodeGenerator::FinishFrame to align the frame after
      >   allocating callee-saved registers, and relaxes the constraints on
      >   the number of callee-saved registers.
      >
      > Bug: v8:9198
      > Change-Id: Iacb0518b57fa3ea2ff801eda69719f4c32733850
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694104
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72781}
      
      Bug: v8:9198
      Change-Id: I0b809fab67586ac188c39ef1569c0b2ceb60d3b9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2738957Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73239}
      13568594
    • Bill Budge's avatar
      Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size""" · e639eafe
      Bill Budge authored
      This is a reland of 352b9ecb
      
      The test/fix CL has been merged in, as the fixes to return slot
      accounting are needed to fix Arm64 issues turned up by the fuzzers:
      
      https://chromium-review.googlesource.com/c/v8/v8/+/2644139
      
      The reverted fix for Wasm return slot allocation is added in
      patchset #2, to avoid fuzzer issues that it fixed:
      
      https://chromium-review.googlesource.com/c/v8/v8/+/2683024
      
      TBR=neis@chromium.org
      
      Original change's description:
      > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      >
      > This is a reland of 1694925c
      >
      > Minor fix to linkage for constexpr.
      >
      > TBR=ahaas@chromium.org,neis@chromium.org
      >
      > Original change's description:
      > > Reland "[compiler][wasm] Align Frame slots to value size"
      > >
      > > This is a reland of cddaf66c
      > >
      > > Original change's description:
      > > > [compiler][wasm] Align Frame slots to value size
      > > >
      > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > >   allocation. This attempts to use alignment holes for smaller
      > > >   values.
      > > > - Reworks Frame to use the new allocator for stack slots.
      > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > >   slots and for ARMv7 FP register aliasing.
      > > > - Fixes the RegisterAllocator to align spill slots.
      > > > - Fixes InstructionSelector to align spill slots.
      > > >
      > > > Bug: v8:9198
      > > >
      > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > >
      > > Bug: v8:9198
      > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72195}
      >
      > Bug: v8:9198
      > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72209}
      
      Bug: v8:9198
      Change-Id: Ia5cf63af4e5991bc7cf42da9972ffd044fc829f0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733177
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73238}
      e639eafe
  2. 23 Feb, 2021 1 commit
    • Bill Budge's avatar
      Revert "Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""" · 942af6c7
      Bill Budge authored
      This reverts commit 9da4e363.
      
      Reason for revert: Fuzzers revealed that Liftoff doesn't use the CallDescriptor when pushing arguments, breaking linkage.
      
      tbr=ahaas@chromium.org,neis@chromium.org,jgruber@chromium.org
      
      Original change's description:
      > Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""
      >
      > This is a reland of 352b9ecb
      >
      > The test/fix CL has been merged in, as the fixes to return slot
      > accounting are needed to fix Arm64 issues turned up by the fuzzers:
      >
      > https://chromium-review.googlesource.com/c/v8/v8/+/2644139
      >
      > Original change's description:
      > > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      > >
      > > This is a reland of 1694925c
      > >
      > > Minor fix to linkage for constexpr.
      > >
      > > TBR=ahaas@chromium.org,neis@chromium.org
      > >
      > > Original change's description:
      > > > Reland "[compiler][wasm] Align Frame slots to value size"
      > > >
      > > > This is a reland of cddaf66c
      > > >
      > > > Original change's description:
      > > > > [compiler][wasm] Align Frame slots to value size
      > > > >
      > > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > > >   allocation. This attempts to use alignment holes for smaller
      > > > >   values.
      > > > > - Reworks Frame to use the new allocator for stack slots.
      > > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > > >   slots and for ARMv7 FP register aliasing.
      > > > > - Fixes the RegisterAllocator to align spill slots.
      > > > > - Fixes InstructionSelector to align spill slots.
      > > > >
      > > > > Bug: v8:9198
      > > > >
      > > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > > >
      > > > Bug: v8:9198
      > > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#72195}
      > >
      > > Bug: v8:9198
      > > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72209}
      >
      > Bug: v8:9198
      > Change-Id: I8258f87463f66417c7028b9a1fed4b9b6d82a3be
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2669892
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72506}
      
      Bug: v8:9198
      Change-Id: I7f344e4d018ce3c02333b0b08efeecdd8cddf082
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713207Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72937}
      942af6c7
  3. 22 Feb, 2021 1 commit
    • Bill Budge's avatar
      Revert "[compiler][linkage] No allocation of slots after aligning a frame" · e6bc2e5d
      Bill Budge authored
      This reverts commit b18bc221.
      
      Reason for revert: Rolling back to previous greedy slot allocator.
      
      tbr=jgruber@chromium.org
      
      Original change's description:
      > [compiler][linkage] No allocation of slots after aligning a frame
      >
      > - Adds DCHECKs to make sure no stack slots are allocated after
      >   aligning a frame.
      > - Changes Arm64 CodeGenerator::FinishFrame to align the frame after
      >   allocating callee-saved registers, and relaxes the constraints on
      >   the number of callee-saved registers.
      >
      > Bug: v8:9198
      > Change-Id: Iacb0518b57fa3ea2ff801eda69719f4c32733850
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694104
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72781}
      
      Bug: v8:9198
      Change-Id: I53f415b7b0f73b57db24859d1199c6a44f911035
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713204
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72930}
      e6bc2e5d
  4. 16 Feb, 2021 1 commit
  5. 03 Feb, 2021 1 commit
    • Bill Budge's avatar
      Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size""" · 9da4e363
      Bill Budge authored
      This is a reland of 352b9ecb
      
      The test/fix CL has been merged in, as the fixes to return slot
      accounting are needed to fix Arm64 issues turned up by the fuzzers:
      
      https://chromium-review.googlesource.com/c/v8/v8/+/2644139
      
      Original change's description:
      > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      >
      > This is a reland of 1694925c
      >
      > Minor fix to linkage for constexpr.
      >
      > TBR=ahaas@chromium.org,neis@chromium.org
      >
      > Original change's description:
      > > Reland "[compiler][wasm] Align Frame slots to value size"
      > >
      > > This is a reland of cddaf66c
      > >
      > > Original change's description:
      > > > [compiler][wasm] Align Frame slots to value size
      > > >
      > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > >   allocation. This attempts to use alignment holes for smaller
      > > >   values.
      > > > - Reworks Frame to use the new allocator for stack slots.
      > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > >   slots and for ARMv7 FP register aliasing.
      > > > - Fixes the RegisterAllocator to align spill slots.
      > > > - Fixes InstructionSelector to align spill slots.
      > > >
      > > > Bug: v8:9198
      > > >
      > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > >
      > > Bug: v8:9198
      > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72195}
      >
      > Bug: v8:9198
      > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72209}
      
      Bug: v8:9198
      Change-Id: I8258f87463f66417c7028b9a1fed4b9b6d82a3be
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2669892Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72506}
      9da4e363
  6. 30 Jan, 2021 1 commit
    • Bill Budge's avatar
      Revert "Reland "Reland "[compiler][wasm] Align Frame slots to value size""" · 797c1e3b
      Bill Budge authored
      This reverts commit 352b9ecb.
      
      Reason for revert: fuzzers turned up more problems:
      https://bugs.chromium.org/p/chromium/issues/detail?id=1171759
      https://bugs.chromium.org/p/chromium/issues/detail?id=1171846
      
      tbr=ahaas@chromium.org,neis@chromium.org
      
      Original change's description:
      > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      >
      > This is a reland of 1694925c
      >
      > Minor fix to linkage for constexpr.
      >
      > TBR=ahaas@chromium.org,neis@chromium.org
      >
      > Original change's description:
      > > Reland "[compiler][wasm] Align Frame slots to value size"
      > >
      > > This is a reland of cddaf66c
      > >
      > > Original change's description:
      > > > [compiler][wasm] Align Frame slots to value size
      > > >
      > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > >   allocation. This attempts to use alignment holes for smaller
      > > >   values.
      > > > - Reworks Frame to use the new allocator for stack slots.
      > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > >   slots and for ARMv7 FP register aliasing.
      > > > - Fixes the RegisterAllocator to align spill slots.
      > > > - Fixes InstructionSelector to align spill slots.
      > > >
      > > > Bug: v8:9198
      > > >
      > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > >
      > > Bug: v8:9198
      > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72195}
      >
      > Bug: v8:9198
      > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72209}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9198
      Change-Id: Ifee566e3e82f2e774525996b038ce135190d0be1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660378
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72447}
      797c1e3b
  7. 21 Jan, 2021 1 commit
    • Bill Budge's avatar
      Reland "Reland "[compiler][wasm] Align Frame slots to value size"" · 352b9ecb
      Bill Budge authored
      This is a reland of 1694925c
      
      Minor fix to linkage for constexpr.
      
      TBR=ahaas@chromium.org,neis@chromium.org
      
      Original change's description:
      > Reland "[compiler][wasm] Align Frame slots to value size"
      >
      > This is a reland of cddaf66c
      >
      > Original change's description:
      > > [compiler][wasm] Align Frame slots to value size
      > >
      > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > >   allocation. This attempts to use alignment holes for smaller
      > >   values.
      > > - Reworks Frame to use the new allocator for stack slots.
      > > - Reworks LinkageAllocator to use the new allocator for stack
      > >   slots and for ARMv7 FP register aliasing.
      > > - Fixes the RegisterAllocator to align spill slots.
      > > - Fixes InstructionSelector to align spill slots.
      > >
      > > Bug: v8:9198
      > >
      > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#71644}
      >
      > Bug: v8:9198
      > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72195}
      
      Bug: v8:9198
      Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72209}
      352b9ecb
  8. 20 Jan, 2021 2 commits
    • Clemens Backes's avatar
      Revert "Reland "[compiler][wasm] Align Frame slots to value size"" · f1730ded
      Clemens Backes authored
      This reverts commit 1694925c.
      
      Reason for revert: Link error in CFI release build: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20CFI%20-%20release%20builder/19756/overview
      
      Original change's description:
      > Reland "[compiler][wasm] Align Frame slots to value size"
      >
      > This is a reland of cddaf66c
      >
      > Original change's description:
      > > [compiler][wasm] Align Frame slots to value size
      > >
      > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > >   allocation. This attempts to use alignment holes for smaller
      > >   values.
      > > - Reworks Frame to use the new allocator for stack slots.
      > > - Reworks LinkageAllocator to use the new allocator for stack
      > >   slots and for ARMv7 FP register aliasing.
      > > - Fixes the RegisterAllocator to align spill slots.
      > > - Fixes InstructionSelector to align spill slots.
      > >
      > > Bug: v8:9198
      > >
      > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#71644}
      >
      > Bug: v8:9198
      > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72195}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      Change-Id: Ic94763925195c3a3552930e61a0eb0b7f0c0c756
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9198
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640474Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72197}
      f1730ded
    • Bill Budge's avatar
      Reland "[compiler][wasm] Align Frame slots to value size" · 1694925c
      Bill Budge authored
      This is a reland of cddaf66c
      
      Original change's description:
      > [compiler][wasm] Align Frame slots to value size
      >
      > - Adds an AlignedSlotAllocator class and tests, to unify slot
      >   allocation. This attempts to use alignment holes for smaller
      >   values.
      > - Reworks Frame to use the new allocator for stack slots.
      > - Reworks LinkageAllocator to use the new allocator for stack
      >   slots and for ARMv7 FP register aliasing.
      > - Fixes the RegisterAllocator to align spill slots.
      > - Fixes InstructionSelector to align spill slots.
      >
      > Bug: v8:9198
      >
      > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71644}
      
      Bug: v8:9198
      Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72195}
      1694925c
  9. 10 Dec, 2020 1 commit
    • Bill Budge's avatar
      Revert "[compiler][wasm] Align Frame slots to value size" · ba4c08a9
      Bill Budge authored
      This reverts commit cddaf66c.
      
      Reason for revert: Multiple fuzzer failures
      
      TBR=neis@chromium.org,ahaas@chromium.org
      
      Original change's description:
      > [compiler][wasm] Align Frame slots to value size
      >
      > - Adds an AlignedSlotAllocator class and tests, to unify slot
      >   allocation. This attempts to use alignment holes for smaller
      >   values.
      > - Reworks Frame to use the new allocator for stack slots.
      > - Reworks LinkageAllocator to use the new allocator for stack
      >   slots and for ARMv7 FP register aliasing.
      > - Fixes the RegisterAllocator to align spill slots.
      > - Fixes InstructionSelector to align spill slots.
      >
      > Bug: v8:9198
      >
      > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71644}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9198
      Change-Id: Ib26d016df6f30f333d30b5ac14eed9630bba8252
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584200
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71703}
      ba4c08a9
  10. 07 Dec, 2020 1 commit
  11. 03 Dec, 2020 1 commit
  12. 19 Dec, 2018 2 commits
  13. 12 Nov, 2018 1 commit
  14. 15 Jan, 2018 1 commit
    • Andreas Haas's avatar
      [arm64][turbofan] Implement on-stack returns. · c710e658
      Andreas Haas authored
      This is the implementation of crrev.com/c/766371 for arm64.
      
      Original description:
      
      Add the ability to return (multiple) return values on the stack:
      
      - Extend stack frames with a new buffer region for return slots.
        This region is located at the end of a caller's frame such that
        its slots can be indexed as caller frame slots in a callee
        (located beyond its parameters) and assigned return values.
      - Adjust stack frame constructon and deconstruction accordingly.
      - Extend linkage computation to support register plus stack returns.
      - Reserve return slots in caller frame when respective calls occur.
      - Introduce and generate architecture instructions ('peek') for
        reading back results from return slots in the caller.
      - Aggressive tests.
      - Some minor clean-up.
      
      R=v8-arm-ports@googlegroups.com
      
      Change-Id: I6e344a23f359861c9a1ff5a6511651c2176ce9a8
      Reviewed-on: https://chromium-review.googlesource.com/842545Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50585}
      c710e658
  15. 12 Dec, 2017 1 commit
    • Andreas Haas's avatar
      Reland [turbofan] Implement on-stack returns (Intel) · bd732f7d
      Andreas Haas authored
      The original CL introduced a test which uses a random number generator.
      I disable the test for now, which is okay because this CL adds to a
      work-in-progress feature anyways, and I will fix the problem in another
      CL.
      
      Original description:
      Add the ability to return (multiple) return values on the stack:
      
      - Extend stack frames with a new buffer region for return slots.
        This region is located at the end of a caller's frame such that
        its slots can be indexed as caller frame slots in a callee
        (located beyond its parameters) and assigned return values.
      - Adjust stack frame constructon and deconstruction accordingly.
      - Extend linkage computation to support register plus stack returns.
      - Reserve return slots in caller frame when respective calls occur.
      - Introduce and generate architecture instructions ('peek') for
        reading back results from return slots in the caller.
      - Aggressive tests.
      - Some minor clean-up.
      
      So far, only ia32 and x64 are implemented.
      
      Change-Id: I8b03fc4e53946daaa0e14a34603f4824a04fad7e
      Reviewed-on: https://chromium-review.googlesource.com/819557Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50031}
      bd732f7d
  16. 11 Dec, 2017 2 commits
    • Andreas Haas's avatar
      Revert "[turbofan] Implement on-stack returns (Intel)" · 943ccb98
      Andreas Haas authored
      This reverts commit 1e49864f.
      
      Reason for revert: Crashing test on the waterfall https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Linux_gcc_4.8%2F16871%2F%2B%2Frecipes%2Fsteps%2FCheck%2F0%2Flogs%2FReturnMultipleRandom%2F0
      
      Original change's description:
      > [turbofan] Implement on-stack returns (Intel)
      > 
      > Add the ability to return (multiple) return values on the stack:
      > 
      > - Extend stack frames with a new buffer region for return slots.
      >   This region is located at the end of a caller's frame such that
      >   its slots can be indexed as caller frame slots in a callee
      >   (located beyond its parameters) and assigned return values.
      > - Adjust stack frame constructon and deconstruction accordingly.
      > - Extend linkage computation to support register plus stack returns.
      > - Reserve return slots in caller frame when respective calls occur.
      > - Introduce and generate architecture instructions ('peek') for
      >   reading back results from return slots in the caller.
      > - Aggressive tests.
      > - Some minor clean-up.
      > 
      > So far, only ia32 and x64 are implemented.
      > 
      > Change-Id: I9532ad13aa307c1dec40548c5b84600fe2f762ce
      > Reviewed-on: https://chromium-review.googlesource.com/766371
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49994}
      
      TBR=titzer@chromium.org,rossberg@chromium.org,ahaas@chromium.org
      
      Change-Id: Ib257e92448942f8ef07d5ef246f9381f4784f014
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/819637Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50000}
      943ccb98
    • Andreas Haas's avatar
      [turbofan] Implement on-stack returns (Intel) · 1e49864f
      Andreas Haas authored
      Add the ability to return (multiple) return values on the stack:
      
      - Extend stack frames with a new buffer region for return slots.
        This region is located at the end of a caller's frame such that
        its slots can be indexed as caller frame slots in a callee
        (located beyond its parameters) and assigned return values.
      - Adjust stack frame constructon and deconstruction accordingly.
      - Extend linkage computation to support register plus stack returns.
      - Reserve return slots in caller frame when respective calls occur.
      - Introduce and generate architecture instructions ('peek') for
        reading back results from return slots in the caller.
      - Aggressive tests.
      - Some minor clean-up.
      
      So far, only ia32 and x64 are implemented.
      
      Change-Id: I9532ad13aa307c1dec40548c5b84600fe2f762ce
      Reviewed-on: https://chromium-review.googlesource.com/766371
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49994}
      1e49864f
  17. 20 Apr, 2016 1 commit
    • mtrofin's avatar
      [turbofan] CodeGenerator: Frame setup refactoring · 81a1530e
      mtrofin authored
      Before frame elision, we finalized the frame shape when assembling the
      prologue, which is also when we prepared the frame (saving sp, etc).
      
      The frame finalization only needs to happen once, and happens to be
      actually a set of idempotent operations. With frame elision, the logic for
      frame finalization was happening every time we constructed the frame.
      Albeit idempotent operations, the code would become hard to maintain.
      
      This change separates frame shape finalization from frame
      construction. When constructing the CodeGenerator, we finalize the
      frame. Subsequent access is to a const Frame*.
      
      Also renamed AssemblePrologue to AssembleConstructFrame, as
      suggested in the frame elision CR.
      
      Separating frame setup gave the opportunity to do away with
      architecture-independent frame aligning (which is something just arm64
      cares about), and also with stack pointer setup (also arm64). Both of
      these happen now at frame finalization on arm64.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1843143002
      
      Cr-Commit-Position: refs/heads/master@{#35642}
      81a1530e
  18. 12 Apr, 2016 1 commit
  19. 30 Mar, 2016 1 commit
  20. 11 Mar, 2016 1 commit
  21. 08 Mar, 2016 1 commit
    • danno's avatar
      [runtime] Unify and simplify how frames are marked · 9dcd0857
      danno authored
      Before this CL, various code stubs used different techniques
      for marking their frames to enable stack-crawling and other
      access to data in the frame. All of them were based on a abuse
      of the "standard" frame representation, e.g. storing the a
      context pointer immediately below the frame's fp, and a
      function pointer after that. Although functional, this approach
      tends to make stubs and builtins do an awkward, unnecessary
      dance to appear like standard frames, even if they have
      nothing to do with JavaScript execution.
      
      This CL attempts to improve this by:
      
      * Ensuring that there are only two fundamentally different
        types of frames, a "standard" frame and a "typed" frame.
        Standard frames, as before, contain both a context and
        function pointer. Typed frames contain only a minimum
        of a smi marker in the position immediately below the fp
        where the context is in standard frames.
      * Only interpreted, full codegen, and optimized Crankshaft and
        TurboFan JavaScript frames use the "standard" format. All
        other frames use the type frame format with an explicit
        marker.
      * Typed frames can contain one or more values below the
        type marker. There is new magic macro machinery in
        frames.h that simplifies defining the offsets of these fields
        in typed frames.
      * A new flag in the CallDescriptor enables specifying whether
        a frame is a standard frame or a typed frame. Secondary
        register location spilling is now only enabled for standard
        frames.
      * A zillion places in the code have been updated to deal with
        the fact that most code stubs and internal frames use the
        typed frame format. This includes changes in the
        deoptimizer, debugger, and liveedit.
      * StandardFrameConstants::kMarkerOffset is deprecated,
        (CommonFrameConstants::kContextOrFrameTypeOffset
        and StandardFrameConstants::kFrameOffset are now used
        in its stead).
      
      LOG=N
      
      Review URL: https://codereview.chromium.org/1696043002
      
      Cr-Commit-Position: refs/heads/master@{#34571}
      9dcd0857
  22. 11 Jan, 2016 1 commit
  23. 24 Nov, 2015 1 commit
    • danno's avatar
      [turbofan] Add general support for sp-based frame access · 51669873
      danno authored
      Some highlights of this CL:
      * Refactor the mutable state out of Frame into FrameAccessState,
        which is maintained and updated during code generation to
        record whether sp- or fp-based frame access is currently active
        and how deep the stack on top of the frame is.
      * The operand resultion in linkage.cc now uses FrameAccessState
        to determine how to generate frame-accessing operands.
      * Update all platforms to accurately track additionally pushed
        stack slots (e.g. arguments for calls) in the FrameAccessState.
      * Add a flag, --turbo_sp_frame_access, which forces all frame
        access to be sp-based whenever possible. This will likely never
        be used in production, but for testing it's useful in verifying
        that the stack-tracking of each platform maintained in the
        FrameAccessState is correct.
      * Use sp-based frame access for gap resolving before tail
        calls. This will allow for slightly more efficient restoration
        of the frame pointer in the tail call in a later CL.
      * Remove most ad hoc groping into CallDescriptors to
        determine if a frame is needed, instead consistently use
        predicates like needs_frame(), IsCFunctionCall() and
        IsJSFunctionCall().
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1460183002
      
      Cr-Commit-Position: refs/heads/master@{#32234}
      51669873
  24. 19 Nov, 2015 1 commit
    • jacob.bramley's avatar
      [arm64] Use SP-offset rather than FP-offset. · dad635ee
      jacob.bramley authored
      A64 loads and stores can have much larger positive than negative
      immediate offsets, and since most frame slots are below fp, we can
      significantly improve accesses by basing them on sp instead. Typical
      example:
      
          Before                  After
          mov x16, #-416
          str x20, [fp, x16]      str x20, [jssp, #32]
      
      Notable benchmark results include lua_binarytrees, which improves by
      about 7.5% on A57 and 5% on A53. Several other asm.js benchmarks gain
      2-4%.
      
      Review URL: https://codereview.chromium.org/1376173003
      
      Cr-Commit-Position: refs/heads/master@{#32111}
      dad635ee
  25. 18 Aug, 2015 1 commit
    • danno's avatar
      [turbofan] Unify referencing of stack slots · cbbaf9ea
      danno authored
      Previously, it was not possible to specify StackSlotOperands for all
      slots in both the caller and callee stacks. Specifically, the region
      of the callee's stack including the saved return address, frame
      pointer, function pointer and context pointer could not be addressed
      by the register allocator/gap resolver.
      
      In preparation for better tail call support, which will use the gap
      resolver to reconcile outgoing parameters, this change makes it
      possible to address all slots on the stack, because slots in the
      previously inaccessible dead zone may become parameter slots for
      outgoing tail calls. All caller stack slots are accessible as they
      were before, with slot -1 corresponding to the last stack
      parameter. Stack slot indices >= 0 access the callee stack, with slot
      0 corresponding to the callee's saved return address, 1 corresponding
      to the saved frame pointer, 2 corresponding to the current function
      context, 3 corresponding to the frame marker/JSFunction, and slots 4
      and above corresponding to spill slots.
      
      The following changes were specifically	needed:
      
      * Frame	has been changed to explicitly manage three areas of the
        callee frame, the fixed header, the spill slot area, and the
        callee-saved register area.
      * Conversions from stack slot indices to fp offsets all now go through
        a common bottleneck: OptimizedFrame::StackSlotOffsetRelativeToFp
      * The generation of deoptimization translation tables has been changed
        to support the new stack slot indexing scheme. Crankshaft, which
        doesn't support the new slot numbering in its register allocator,
        must adapt the indexes when creating translation tables.
      * Callee-saved parameters are now kept below spill slots, not above,
        to support saving only the optimal set of used registers, which is
        only known after register allocation is finished and spill slots
        have been allocated.
      
      Review URL: https://codereview.chromium.org/1261923007
      
      Cr-Commit-Position: refs/heads/master@{#30224}
      cbbaf9ea