1. 16 Sep, 2020 1 commit
  2. 11 Sep, 2020 1 commit
  3. 18 Aug, 2020 1 commit
  4. 13 Aug, 2020 1 commit
  5. 10 Aug, 2020 1 commit
  6. 31 Jul, 2020 3 commits
  7. 30 Jul, 2020 3 commits
  8. 28 Jul, 2020 2 commits
    • Ross McIlroy's avatar
      [TurboProp] Add reference map population to fast reg alloc. · e9a37bf8
      Ross McIlroy authored
      Adds support for populating reference maps to the fast
      register allocator. In order to calculate whether a stack slot
      is live at a given instruction, we use the dominator tree to
      build a bitmap of blocks which are dominated by each block.
      A variable's spill operand is classed as alive for any blocks that are
      dominated by the block it was defined in, until the instruction index
      of the spill operand's last use. As such, it may be classified as live
      down a branch where the spill operand is never used, however it is safe
      since the spill slot won't be re-allocated until after it's last-use
      instruction index in any case.
      
      BUG=v8:9684
      
      Change-Id: I772374599ef916f57d82d468f66429e32c712ddf
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2298008
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69108}
      e9a37bf8
    • Ross McIlroy's avatar
      [TurboProp] Add support for spill slot allocation to fast reg alloc · 5b0c6cde
      Ross McIlroy authored
      Adds support for tracking the instruction range of spilled operands,
      and then allocating spill slots to these ranges. It also adds some
      unittests covering spill slot allocation.
      
      Spill slots are allocated in a linear fashion, running through the
      instruction stream in a linear order, ensuring that no spill operand
      is allocated to a same spill slot that is already assigned to during
      this whole start / end range. This isn’t optimal, since it doesn’t
      take into account holes in these ranges (e.g, blocks between start
      and end that aren’t dominated by the start), but in practice rarely
      leads to more than one extra spill slot being allocated compared to
      the current allocator.
      
      BUG=v8:9684
      
      Change-Id: Iedee7bcf552080e5b4b6a2f4e96b78b6c1396cab
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297470Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69107}
      5b0c6cde
  9. 24 Jul, 2020 2 commits
  10. 22 Jul, 2020 1 commit
    • Seth Brenith's avatar
      Profile-guided optimization of builtins · 922983df
      Seth Brenith authored
      Design doc:
      https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
      
      V8 can already collect data about how many times each basic block in the
      builtins is run. This change enables using that data for profile-guided
      optimization. New comments in BUILD.gn describe how to use this feature.
      
      A few implementation details worth mentioning, which aren't covered in
      the design doc:
      
      - BasicBlockProfilerData currently contains an array of RPO numbers.
        However, this array is always just [0, 1, 2, 3, ...], so this change
        removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
        ensures that the removal is valid.
      
      - RPO numbers, while useful for printing data that matches with the
        stringified schedule, are not useful for matching profiling data with
        blocks that haven't been scheduled yet. This change adds a new array
        of block IDs in BasicBlockProfilerData, so that block counters can be
        used for PGO.
      
      - Basic block counters need to be written to a file so that they can be
        provided to a subsequent run of mksnapshot, but the design doc doesn't
        specify the transfer format or what file is used. In this change, I
        propose using the existing v8.log file for that purpose. Block count
        records look like this:
      
        block,TestLessThanHandler,37,29405
      
        This line indicates that block ID 37 in TestLessThanHandler was run
        29405 times. If multiple lines refer to the same block, the reader
        adds them all together. I like this format because it's easy to use:
        - V8 already has robust logic for creating the log file, naming it to
          avoid conflicts in multi-process situations, etc.
        - Line order doesn't matter, and interleaved writes from various
          logging sources are fine, given that V8 writes each line atomically.
        - Combining multiple sources of profiling data is as simple as
          concatenating their v8.log files together.
      
      - It is a good idea to avoid making any changes based on profiling data
        if the function being compiled doesn't match the one that was
        profiled, since it is common to use profiling data downloaded from a
        central lab which is updated only periodically. To check whether a
        function matches, I propose using a hash of the Graph state right
        before scheduling. This might be stricter than necessary, as some
        changes to the function might be small enough that the profile data is
        still relevant, but I'd rather err on the side of not making incorrect
        changes. This hash is also written to the v8.log file, in a line that
        looks like this:
      
        builtin_hash,LdaZeroHandler,3387822046
      
      Bug: v8:10470
      Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69008}
      922983df
  11. 14 Jul, 2020 2 commits
  12. 10 Jul, 2020 2 commits
  13. 06 Jul, 2020 3 commits
  14. 30 Jun, 2020 1 commit
    • Jakob Gruber's avatar
      [nci] Add feedback input to Call nodes · 2b236e33
      Jakob Gruber authored
      This is likely the major change of the series, as Call nodes are the
      focus of call reducer (and to a lesser extent other phases like
      inlining).
      
      This CL essentially adds the new input to Call nodes, and updates the
      rest of the pipeline. As a (fairly large) drive-by, I also introduce
      the JSCallNode wrapper class and apply it in call reducer.
      
      This change, although large, will hopefully make future refactorings
      *much* easier, since it is now clear where certain assumptions about
      Call node layout are made.
      
      Bug: v8:8888
      Change-Id: Ia15fe0ba459b6034863a5815a4e4662cee41fc83
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264353
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68616}
      2b236e33
  15. 23 Jun, 2020 2 commits
  16. 15 Jun, 2020 1 commit
    • Jakob Gruber's avatar
      [nci] Add native_context_independent flags · f30b53bd
      Jakob Gruber authored
      ... to OptimizedCompilationInfo, BytecodeGraphBuilder, and
      JSHeapBroker.
      
      Also add first uses of these flags in pipeline.cc by skipping certain
      phases when nci is enabled. With this change, tests in the NCI variant
      will start to fail since generic lowering is not fully implemented.
      These implementations will follow incrementally in the next days.
      
      Bug: v8:8888
      Change-Id: I3f570fb92f09059d1f1f4015f88ffe80ccf746ad
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2239572
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68339}
      f30b53bd
  17. 10 Jun, 2020 2 commits
  18. 08 Jun, 2020 2 commits
  19. 03 Jun, 2020 1 commit
  20. 02 Jun, 2020 2 commits
  21. 25 May, 2020 1 commit
    • Ross McIlroy's avatar
      [TurboProp] Don't try to rewire unreachable blocks to end. · f34771f7
      Ross McIlroy authored
      We can't consistently rewire the successor blocks of an unreachable node to
      disconnect them from the graph when we are trying to maintain the schedule.
      Instead simply leave the code there. As a future optimization we could add a
      proper scheduled dead code elimination phase which can deal with this.
      
      As a side-effect, one of the tests sees a int64 DeadValue, so add support for that
      in the instruction selector.
      
      BUG=chromium:1083272,chromium:1083763,chromium:1084953,v8:9684
      
      Change-Id: I69a6feaeef4eae62110392e27ea848b28bccf787
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209061
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67953}
      f34771f7
  22. 22 May, 2020 1 commit
    • Seth Brenith's avatar
      [torque] Generate better code when using `&` operator on bitfields · 98438d86
      Seth Brenith authored
      Sometimes CSA code carefully constructs a mask to check several
      bitfields at once. Thus far, such a check has been very awkward to write
      in Torque. This change adds a way to do so, using the
      non-short-circuiting binary `&` operator. So now you can write an
      expression that depends on several bitfields from a bitfield struct,
      like `x.a == 5 & x.b & !x.c & x.d == 2` (assuming b is a one-bit value),
      and it will be reduced to a single mask and equality check. To
      demonstrate a usage of this new reduction, this change ports the trivial
      macro IsSimpleObjectMap to Torque. I manually verified that the
      generated code for the builtin SetDataProperties, which uses that macro,
      is unchanged.
      
      Bug: v8:7793
      Change-Id: I4a23e0005d738a6699ea0f2a63f9fd67b01e7026
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2183276
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67948}
      98438d86
  23. 13 May, 2020 1 commit
  24. 06 May, 2020 1 commit
    • Ross McIlroy's avatar
      [TurboProp] Fully remove successors from schedule on unreachable. · 66e1c84d
      Ross McIlroy authored
      Fully remove the successor blocks when effect-control-linearization
      reaches an unreachable node and is maintaining the schedule. Previously
      we just updated the current_block_'s successor and removed any
      unreachable predecessors from end, however if the current_block_ is not
      an original block in the schedule, but a new one added due to control
      flow from effect control linearization lowering, the removed successor
      blocks could still be re-connected to the end block when they were
      lowered. Instead, entirely remove these unreachable blocks from the
      predecessor / successor chains, and have the effect-control-linearizer
      avoid lowering these blocks entirely.
      
      BUG=chromium:1076569,v8:9684
      
      Change-Id: I4b4216019d55aef5363d88255726b85df8e7ada5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2179842Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67595}
      66e1c84d
  25. 01 May, 2020 1 commit
  26. 29 Apr, 2020 1 commit
    • Tobias Tebbi's avatar
      Reland "Reland "[turbofan][csa] optimize Smi untagging better"" · 9e9cd5df
      Tobias Tebbi authored
      This is a reland of 43b885a8
      This fixes another signed overflow in the unit test.
      
      Original change's description:
      > Reland "[turbofan][csa] optimize Smi untagging better"
      >
      > This is a reland of ff22ae80
      >
      > Original change's description:
      > > [turbofan][csa] optimize Smi untagging better
      > >
      > > - Introduce new operator variants for signed right-shifts with the
      > >   additional information that they always shift out zeros.
      > > - Use these new operators for Smi untagging.
      > > - Merge left-shifts with a preceding Smi-untagging shift.
      > > - Optimize comparisons of Smi-untagging shifts to operate on the
      > >   unshifted word.
      > > - Optimize 64bit comparisons of values expanded from 32bit to use
      > >   a 32bit comparison instead.
      > > - Change CodeStubAssembler::UntagSmi to first sign-extend and then
      > >   right-shift to enable better address computations for Smi indices.
      > >
      > > Bug: v8:9962
      > > Change-Id: If91300f365e8f01457aebf0bd43bdf88b305c460
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135734
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#67378}
      >
      > Bug: v8:9962
      > Change-Id: Ieab0755806c95fb50022eb17596fb0c95f36004c
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2170001
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Georg Neis <neis@chromium.org>
      > Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67430}
      
      Bug: v8:9962
      TBR: neis@chromium.org
      Change-Id: I79883db546bf37873b3727b8023ef688507091d9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2169103
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67464}
      9e9cd5df