1. 05 Aug, 2020 2 commits
  2. 30 Jul, 2020 1 commit
  3. 27 Jul, 2020 3 commits
  4. 24 Jul, 2020 1 commit
  5. 22 Jul, 2020 3 commits
    • 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
    • Richard Stotz's avatar
      [turbofan][wasm][arm64] Improved saturated conversions float32 to int32. · fafb4769
      Richard Stotz authored
      The design of this change was discussed here:
      https://docs.google.com/document/d/12otOj6SyXMXj0Dnnx9B6MGLMRwHPhg6RIZRazVw3tFA/
      
      Bug: v8:10720
      Change-Id: I8292dcf7272bdf4526a2d630b49fc374cdb01bdc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304570
      Commit-Queue: Richard Stotz <rstz@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68994}
      fafb4769
    • Santiago Aboy Solanes's avatar
      [clenaup][csa] Remove Sloppy-ness from LoadObjectField · 1f5cc247
      Santiago Aboy Solanes authored
      We want to use LoadObjectField's version that it is templated (as the
      non-templated one uses Node*). If we remove slopiness, we are forcing to
      TNodify when porting the non-templated calls to the templated ones.
      
      Bug: v8:9708, v8:6949
      Change-Id: Ic564e3f03f1900718a0ec5503da911650bbac1fe
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2310353Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68982}
      1f5cc247
  6. 10 Jul, 2020 1 commit
  7. 23 Jun, 2020 1 commit
    • Daniel Clifford's avatar
      [torque] generate Cast<> macros from Torque-defined classes · 1052dfb3
      Daniel Clifford authored
      This change enables automatic generation of Cast<> operators for
      classes that are defined in Torque.
      
      * Cast<> macros are generated for all classes that are defined in
        Torque code that are neither shapes nor marked with a new
        @doNotGenerateCast annotation.
      
      * Implicitly generated Cast macros simply call through to an
        internally-defined "DownCastForTorqueClass" macro that implements
        the cast using one of three strategies for efficiency. If the class
        has subclasses (i.e. a range of instance types including subtypes),
        the DownCastForTorqueClass checks for inclusion in the instance type
        range. If the class has a single instance type (i.e. no subclasses),
        then either 1) a map check is used if the class has a globally-
        defined map constant or 2) an equality check for the instance type
        is used.
      
      * Added new intrinsics to introspect class information, e.g. fetching
        instance type ranges for a class, accessing the globally-defined map
        for a class.
      
      * Removed a whole pile of existing explicit Cast<> operators that are
        no longer needed because of the implicitly generated Cast<> macros.
      
      * Added tests for the new Cast<> implementations.
      
      Bug: v8:7793
      Change-Id: I3aadb0c62b720e9de4e7978b9ec4f05075771b8b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250239
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68478}
      1052dfb3
  8. 09 Jun, 2020 1 commit
  9. 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
  10. 28 Apr, 2020 2 commits
    • Clemens Backes's avatar
      Revert "Reland "[turbofan][csa] optimize Smi untagging better"" · bef5b85d
      Clemens Backes authored
      This reverts commit 43b885a8.
      
      Reason for revert: Still fails on UBSan: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/10873
      
      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}
      
      TBR=neis@chromium.org,tebbi@chromium.org
      
      Change-Id: I49e19811ebcecb846f61291bc0c4a0d8b0bc4cff
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9962
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2168876Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67431}
      bef5b85d
    • Tobias Tebbi's avatar
      Reland "[turbofan][csa] optimize Smi untagging better" · 43b885a8
      Tobias Tebbi authored
      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: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67430}
      43b885a8
  11. 24 Apr, 2020 2 commits
    • Bill Budge's avatar
      Revert "[turbofan][csa] optimize Smi untagging better" · cdea7999
      Bill Budge authored
      This reverts commit ff22ae80.
      
      Reason for revert: new test fails on UBSAN
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/10831
      
      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}
      
      TBR=neis@chromium.org,tebbi@chromium.org
      
      Change-Id: I2617d7a44e5ae33fd79322d37c8b722c00162d22
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9962
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2165873Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67380}
      cdea7999
    • Tobias Tebbi's avatar
      [turbofan][csa] optimize Smi untagging better · ff22ae80
      Tobias Tebbi authored
      - 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: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67378}
      ff22ae80
  12. 23 Apr, 2020 1 commit
  13. 21 Apr, 2020 1 commit
  14. 08 Apr, 2020 2 commits
  15. 10 Mar, 2020 1 commit
  16. 09 Mar, 2020 1 commit
    • Tobias Tebbi's avatar
      [torque] Generate GC object visitors for Torque classes · 4f4d73f2
      Tobias Tebbi authored
      In the process:
      
      * Augment C++-generated Torque classes with SizeFor methods to
        calculate size of instances.
      
      * Add a new "@generateBodyDescriptor" annotation that causes Torque to
        generate C++ BodyDescriptors code that can be used to visit objects
        compatible with existing V8 mechanisms, e.g. GC
      
      * Fully automate C++ macro machinery so that adding non-extern Torque
        class doesn't require any C++ changes, including ensuring generation
        of instance types and proper boilerplate for validators and
        printers.
      
      * Make handling of @export a true annotation, allowing the modifier to
        be used on class declarations.
      
      * Add functionality such that classes with the @export annotation are
        available to be used from C++. Field accessors for exported classes
        are public and factory methods are generated to create instances of
        the objects from C++.
      
      * Change the Torque compiler such that Non-exported classes implicitly
        have the @generateBodyDescriptor annotation added and causes both
        verifiers and printers to be generated.
      
      * Switch non-extern Torque classes from using existing Struct-based
        machinery to being first-class classes that support more existing
        Torque class features.
      
      Change-Id: Ic60e60c2c6bd7acd57f949bce086898ad14a3b03
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007490
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66621}
      4f4d73f2
  17. 02 Mar, 2020 1 commit
  18. 25 Feb, 2020 1 commit
  19. 24 Feb, 2020 1 commit
  20. 21 Feb, 2020 1 commit
  21. 18 Feb, 2020 1 commit
  22. 17 Feb, 2020 3 commits
  23. 14 Feb, 2020 1 commit
  24. 11 Feb, 2020 1 commit
    • Nico Hartmann's avatar
      [torque] Reduce generated CSA variables and labels · 89b248b6
      Nico Hartmann authored
      This CL significantly reduces the size of CSA files generated from
      torque by introducing only those Phis at block entry that are
      required and otherwise uses defined values directly.
      
      To do so it does:
      - Define a DefinitionLocation that represents where a value is
        defined.
      - For each block compute all the definitions that reach that
        block and introduce a phi iff the reaching definitions for a value
        are not the same for all predecessor blocks.
      - In CSAGenerator map all DefinitionLocations to variables, such that
        if the same value is used in multiple blocks, it is mapped to the
        same variable without the need to pass it along the jump. This
        reduces both the arguments passed to Goto, Branch, ... and the
        variables that need to be passed to Bind when the block's label is
        bound. This reduces the number of temporary variables
        significantly. Temporaries are declared outside of blocks now
        in order to be accessible from other blocks.
      
      Drive-by changes:
      - Sequences of SetSourcePosition calls are merged if no output is
        generated between them.
      - Dead blocks are no longer generated in release builds.
      
      Bug: v8:9861
      Change-Id: I5c30e5376e93c424c3ebfc5144a08592d77ae61f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037444
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66225}
      89b248b6
  25. 07 Feb, 2020 2 commits
  26. 10 Jan, 2020 1 commit
  27. 08 Jan, 2020 1 commit
  28. 20 Dec, 2019 1 commit
  29. 17 Dec, 2019 1 commit