1. 22 Apr, 2020 13 commits
    • Anton Bikineev's avatar
      cppgc: Port FreeList implementation · 308914cc
      Anton Bikineev authored
      - implemented as a single-linked list with head and tail
        pointers. The tail pointer is needed for freelist appending;
      - stores entries in buckets, where bucket[log2(size)] stores
        entries >= size;
      - implements worst fit allocation to amortize free list call;
      - ported from Blink: https://bit.ly/2yC8XKJ.
      
      Bug: chromium:1056170
      Change-Id: I26cf62c948c95a7cbfecd5f7f22ad975e6b8c732
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157376
      Commit-Queue: Anton Bikineev <bikineev@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67310}
      308914cc
    • Leszek Swirski's avatar
      Reland^5 "[parser] Introduce UnoptimizedCompileFlags" · a3228bfc
      Leszek Swirski authored
      This is a reland of e1b93a4f
      which was a reland of 313d4844
      which was a reland of 0a59e0cb
      which was a reland of 146f5375
      which was a reland of d91679bf
      
      Give up on using C++ bitfields, go back to having base::BitField and
      getters/setters.
      
      Original change's description:
      > [parser] Introduce UnoptimizedCompileFlags
      >
      > UnoptimizedCompileFlags defines the input flags shared between parse and
      > compile (currently parse-only). It is set initially with some values, and
      > is immutable after being passed to ParseInfo (ParseInfo still has getters
      > for the fields, but no setters).
      >
      > Since a few of the existing flags were output flags, ParseInfo now has a
      > new output_flags field, which will eventually migrate to a ParseOutputs
      > structure.
      >
      > Bug: v8:10314
      > Change-Id: If3890a5fad883bca80a97bf9dfe44d91797dc286
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096580
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66782}
      
      TBR=ulan@chromium.org,szuend@chromium.org
      
      Bug: v8:10314
      Change-Id: I54bcd107a0e85cf1a2ddeef0759100547eb65652
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157378Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67309}
      a3228bfc
    • Clemens Backes's avatar
      [wasm] Don't block compilation on publishing · 1262eb02
      Clemens Backes authored
      If multiple compilation threads want to publish their generated code,
      they currently block on each other. This can cause multiple background
      threads to be blocked for several hundred milliseconds in the worst
      case.
      
      This CL changes this such that instead of blocking, the threads just
      put the code in a queue from where it is picked up by the thread that
      is currently publishing. Instead of blocking, the threads can then
      continue compiling more code already.
      
      This change might produce regressions, because there is now more
      TurboFan tier-up compilation happening while Liftoff code is being
      published. This might delay the completion of baseline compilation. It
      can also happen that we publish (more) TurboFan code before finishing
      baseline compilation, which would also regress compile scores.
      
      Let's see what the perf bots have to say about this CL. We might need to
      adapt certain things (like delaying TurboFan compilation until all
      Liftoff code finished), or we might just accept slight delays in Liftoff
      compilation, because tier-up will finish sooner after this CL, giving us
      peak performance earlier.
      
      R=ahaas@chromium.org
      
      Bug: v8:10330
      Change-Id: I2f5c15810a0a9fc18461f9cbf4e436ab36aa559d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154200
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67308}
      1262eb02
    • Andreas Haas's avatar
      [wasm][arm] Don't support overlapping LiftoffRegisters in I64Binops · ac518002
      Andreas Haas authored
      The existing code supports overlapping LiftoffRegisters in I64Binops by
      allocating a scratch register. Overlapping LiftoffRegisters means that
      the low register of one LiftoffRegister is the high register of another
      LiftoffRegister. When I64Binop is used in the implementation of atomic
      instructions, no scratch register is available, so overlapping
      LiftoffRegisters cannot be supported. As LiftoffRegisters are
      not supposed to overlap anyways, this CL removes this special handling.
      
      R=clemensb@chromium.org
      
      Bug: v8:10108
      Change-Id: I9ce2143b0930688bc2e6dd56e151f47fba00ec87
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151351
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67307}
      ac518002
    • Dan Elphick's avatar
      [snapshot] Rename partial snapshot to context snapshot · 71bd50e1
      Dan Elphick authored
      The partial snapshot/serializer/deserializer are renamed to context *,
      while the partial snapshot cache is renamed to startup object cache in
      line with the read-only object cache (as this better reflects where it
      lives and what it does).
      
      To avoid a gap in the file history due to renaming both the files and
      identifiers simulataneously, this leaves all the partial-*.* files in
      place. They will be renamed in a follow-up CL.
      
      Bug: v8:10416
      Change-Id: I5ef41cad751aaa24b35ee2b3c72bd0295832f2c6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144115
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Auto-Submit: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67306}
      71bd50e1
    • Seth Brenith's avatar
      Reland "[torque] Allow storing to bitfield structs that are stored in Smis" · a9270e2b
      Seth Brenith authored
      This is a reland of 80843eda
      
      Original change's description:
      > [torque] Allow storing to bitfield structs that are stored in Smis
      > 
      > This change:
      > 1. Updates the Torque compiler to allow direct access to bitfields that
      >    are packed within Smi values, which previously would have required a
      >    separate untagging step,
      > 2. Updates JSRegExpStringIterator to represent its flags in Torque,
      > 3. Adds reduction cases in MachineOperatorReducer for when the input to
      >    a branch or the left-hand side of a Word32Equals is based on a 64-bit
      >    shift-and-mask operation which has been truncated to 32 bits, as is
      >    the case in the code generated by step 1, and
      > 4. Adds a reduction case in MachineOperatorReducer to remove an extra
      >    Word64And operation added by step 1.
      > 
      > Bug: v8:7793
      > Change-Id: Ib4ac2def6211b3cae6be25a8b2a644be5c7d6d3f
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2119225
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67290}
      
      Bug: v8:7793
      Change-Id: I783b6ec080042fec0e922927f6675dede458a072
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159731Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67305}
      a9270e2b
    • Tobias Tebbi's avatar
      [torque] improve error message for const-bound this · 5733c063
      Tobias Tebbi authored
      Bug: v8:7793
      Change-Id: Id0478287b2147ea231cd19dab6d08674b632b0e9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159494
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67304}
      5733c063
    • Clemens Backes's avatar
      [wasm] Fix performance bottleneck in DisjointAllocationPool · 7e0279fa
      Clemens Backes authored
      When compiling modules with many functions, the list of regions in the
      {DisjointAllocationPool} can become quite large if the functions die in
      a random order (which they typically do, since the order of Liftoff
      compilation is different than the order to TurboFan compilation; which
      work stealing, both are nondeterministic).
      Iterating the list of regions in the {DisjointAllocationPool} was thus
      linear in the number of regions, which is linear in the number of
      functions of the module. Since we insert new regions one by one, overall
      runtime was quadratic.
      
      This CL fixes this by switching from a linked list to a std::set.
      Merging a new region is thus logarithmic instead of linear, and overall
      we are {n*log(n)} instead of {n^2}.
      
      Note: For {AllocateInRegion} we still need to linearly iterate all
      regions that overlap the requested region, but this has not shown to be
      a problem so far.
      
      R=ahaas@chromium.org
      
      Bug: v8:10432
      Change-Id: I193e56c2abab782e386194fbe64dadfa250916f7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154797
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67303}
      7e0279fa
    • Andreas Haas's avatar
      [wasm][liftoff][arm] Implement 64-bit atomic binops · 2d45932f
      Andreas Haas authored
      With this CL we reuse the implementation of AtomicStore to implement
      AtomicBinops. The implementation is parametrised by an optional result
      Liftoff register, and by an operation that is applied on the value
      stored in the memory location.
      
      R=clemensb@chromium.org, v8-arm-ports@googlegroups.com
      
      Bug: v8:10108
      Change-Id: I71ff5bf1632d860462d66b43c34515400eae2979
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151349
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67302}
      2d45932f
    • Kong, Fanchen's avatar
      [wasm-simd] [liftoff] Implement fp min/max on ia32 and x64 · 9f41a584
      Kong, Fanchen authored
      Bug: v8:9909
      Change-Id: Ib97bcc7afe516a014cd91128aa3c59f1b8b0b0af
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151999
      Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67301}
      9f41a584
    • Kim-Anh Tran's avatar
      [wasm] Set source url when deserializing wasm module · ec3cadc4
      Kim-Anh Tran authored
      Bug: v8:1071760
      Change-Id: Id2f75aef039574b918768fb323e1a8dbc999606f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2159491Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67300}
      ec3cadc4
    • Yolanda Chen's avatar
      [regalloc] Fix a regression when enable FindOptimalSpillingPos for phis · 8bfd278c
      Yolanda Chen authored
      This patch is to avoid spilling the phi at the loop header if there is a back-edge with an input for the phi that interferes with the phi's value, because in case that input gets spilled it might introduce a stack-to-stack move at the back-edge.
      
      Bug: chromium:1063831
      Change-Id: Ie7129f10fb573cc799c588e6639b5ad486ea520d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152002
      Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67299}
      8bfd278c
    • Jakob Gruber's avatar
      Reland "[snapshot] Extract more files" · d587f67a
      Jakob Gruber authored
      This is a reland of 5c4b8056
      
      Original change's description:
      > [snapshot] Extract more files
      >
      > This moves:
      >
      > - ExternalReferenceEncoder to codegen/external-reference-encoder.h
      > - SerializerDeserializer to snapshot/serializer-deserializer.h
      > - Checksum() to snapshot/snapshot-utils.h
      >
      > serializer-common.h and .cc are removed.
      >
      > Tbr: clemensb@chromium.org,ulan@chromium.org
      > Bug: v8:10416
      > Change-Id: I36a242dcc1ad8833374aa567f73e0d4a75632c58
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144118
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67281}
      
      Tbr: delphick@chromium.org,clemensb@chromium.org,ulan@chromium.org
      Bug: v8:10416
      Change-Id: I6f6a1017435db185778ed931e1ddb13d8d5e920e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157384Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67298}
      d587f67a
  2. 21 Apr, 2020 27 commits