1. 18 Jan, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Use StateValuesAccess to access frame state parameters · 0ef84f99
      Jakob Gruber authored
      FrameState parameters must not be iterated directly since parameters
      can be encoded into StateValues (i.e. parameter i is not necessarily
      InputAt(i)). Instead, they should be accessed through the
      StateValuesAccess helper class.
      
      One example:
      
       82: StateValues[sparse:^^^^^^](81, 31, 32, 33, 34, 35)
        81: StateValues[sparse:^^^^^^^^](110, 24, 25, 26, 27, 28, 29, 30)
        31: NumberConstant[8]
        32: NumberConstant[9]
        33: NumberConstant[10]
        34: NumberConstant[11]
        35: NumberConstant[13]
      
      Here, node 81 holds multiple parameters. These are properly iterated
      by the StateValuesAccess class.
      
      Bug: chromium:1166136
      Change-Id: I12725f83994e1c05571bcba153ff45154b16d93f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625879
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72126}
      0ef84f99
  2. 15 Jul, 2020 1 commit
  3. 10 Jul, 2020 1 commit
  4. 05 Mar, 2020 1 commit
    • Dan Elphick's avatar
      [compiler] Optimize AddInputsToFrameStateDescriptor · 500d73b9
      Dan Elphick authored
      Optimizes InstructionSelector::AddInputsToFrameStateDescriptor by
      taking advantage of SparseInputMask data structure to more quickly
      handle empty inputs and insert all the OptimizedOut entries in one go.
      The number of empty inputs is now determined using CountTrailingZeros
      rather than iterating over them one at a time.
      
      Gives a 9% improvement to SelectInstructions runtime call stat for
      Octane in turboprop.
      
      Bug: v8:10051
      Change-Id: Ib13d6f9644b4c89ba0546a19fe0ed623d69fec99
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037443
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66591}
      500d73b9
  5. 11 Feb, 2020 1 commit
    • Dan Elphick's avatar
      Revert "[compiler] Make StateValuesAccess methods inlinable" · 1a4bbc8a
      Dan Elphick authored
      This reverts commit 14d1b9e9.
      
      Reason for revert: Increases RuntimeStats/Group-JavaScript/duration
      
      Original change's description:
      > [compiler] Make StateValuesAccess methods inlinable
      > 
      > This moves several simple StateValuesAccess methods as well as
      > SparseInputMask::InputIterator::IsReal into their header files so they
      > can be more easily inlined. This gives about a 7% improvement to the
      > BackgroundSelectInstructions runtime call stat.
      > 
      > Also marks some methods called by the new methods as V8_PRIVATE_EXPORT
      > so component build test can build.
      > 
      > Bug: v8:10051
      > Change-Id: I3e34977a4fa660d3f4f55fd4f2c0b2370d5d2bc2
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2023559
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66078}
      
      TBR=neis@chromium.org,delphick@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:10051
      Change-Id: I9168b524bc06562906a12a6ec0e948d6f90d4a7d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2050387Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66219}
      1a4bbc8a
  6. 03 Feb, 2020 1 commit
    • Dan Elphick's avatar
      [compiler] Make StateValuesAccess methods inlinable · 14d1b9e9
      Dan Elphick authored
      This moves several simple StateValuesAccess methods as well as
      SparseInputMask::InputIterator::IsReal into their header files so they
      can be more easily inlined. This gives about a 7% improvement to the
      BackgroundSelectInstructions runtime call stat.
      
      Also marks some methods called by the new methods as V8_PRIVATE_EXPORT
      so component build test can build.
      
      Bug: v8:10051
      Change-Id: I3e34977a4fa660d3f4f55fd4f2c0b2370d5d2bc2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2023559Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66078}
      14d1b9e9
  7. 15 Jul, 2019 1 commit
  8. 08 Jul, 2019 1 commit
  9. 23 May, 2019 1 commit
  10. 02 Dec, 2017 1 commit
    • Mathias Bynens's avatar
      Normalize casing of hexadecimal digits · 822be9b2
      Mathias Bynens authored
      This patch normalizes the casing of hexadecimal digits in escape
      sequences of the form `\xNN` and integer literals of the form
      `0xNNNN`.
      
      Previously, the V8 code base used an inconsistent mixture of uppercase
      and lowercase.
      
      Google’s C++ style guide uses uppercase in its examples:
      https://google.github.io/styleguide/cppguide.html#Non-ASCII_Characters
      
      Moreover, uppercase letters more clearly stand out from the lowercase
      `x` (or `u`) characters at the start, as well as lowercase letters
      elsewhere in strings.
      
      BUG=v8:7109
      TBR=marja@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
      NOPRESUBMIT=true
      
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I790e21c25d96ad5d95c8229724eb45d2aa9e22d6
      Reviewed-on: https://chromium-review.googlesource.com/804294
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49810}
      822be9b2
  11. 25 Sep, 2017 1 commit
  12. 14 Sep, 2017 1 commit
  13. 13 Feb, 2017 1 commit
    • Leszek Swirski's avatar
      [turbofan] Allow registers/accum/params to share state value nodes · 6c5cd4d2
      Leszek Swirski authored
      Previously, accumulators and registers each had a single element cache,
      distinct from the local register cache. This meant that
      
       a) Dead accumulator state nodes were not re-used if the accumulator
          became live.
       b) Functions with only one parameter (the this object) or only one
          local register could not reuse the single-valued state value node
          of the accumulator.
      
      This patch introduces heavier re-use of state-value nodes, decreasing
      memory use when building the graph and decreasing the number of nodes
      created overall.
      
      Change-Id: Ie3cc6913483aab0819d99be382eb2cb42de8c3d2
      Reviewed-on: https://chromium-review.googlesource.com/440926Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#43148}
      6c5cd4d2
  14. 05 Jan, 2017 1 commit
  15. 08 Nov, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce TypedObjectState common operator. · a5d251de
      bmeurer authored
      This adds a new TypedObjectState operator, which is a version of
      ObjectState that carries along MachineTypes for the inputs, so we
      can tell the deoptimizer how to interpret the inputs, instead of
      having to force everything to Tagged.
      
      Drive-by-fix: Remove the unused id parameter from ObjectState.
      
      R=tebbi@chromium.org
      BUG=v8:5609
      
      Review-Url: https://codereview.chromium.org/2488623002
      Cr-Commit-Position: refs/heads/master@{#40832}
      a5d251de
  16. 22 Sep, 2016 1 commit
  17. 20 Sep, 2016 1 commit
  18. 10 Dec, 2015 1 commit
    • jarin's avatar
      [turbofan] Make MachineType a pair of enums. · bb2a830d
      jarin authored
      MachineType is now a class with two enum fields:
      - MachineRepresentation
      - MachineSemantic
      
      Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably:
      - register allocator now uses just the representation.
      - Phi and Select nodes only refer to representations.
      
      Review URL: https://codereview.chromium.org/1513543003
      
      Cr-Commit-Position: refs/heads/master@{#32738}
      bb2a830d
  19. 13 Apr, 2015 1 commit
  20. 19 Mar, 2015 1 commit
    • jarin's avatar
      [turbofan] Remember types for deoptimization during simplified lowering. · b7dc9c58
      jarin authored
      With this change, we remember the types of frame state inputs (in a new
      operator, called TypedStateValues). Instead of inferring the value types
      when building translations, we used the recorded types.
      
      The original approach was not reliable because the passes after
      simplified lowering can change node types, and this in turn confuses
      the translation builder.
      
      BUG=chromium:468727
      LOG=n
      R=bmeurer@chromium.org
      
      Review URL: https://codereview.chromium.org/1015423002
      
      Cr-Commit-Position: refs/heads/master@{#27310}
      b7dc9c58
  21. 17 Mar, 2015 1 commit
    • jarin's avatar
      [turbofan] Variable liveness analysis for deopt. · ca3abde2
      jarin authored
      This change introduces a liveness analyzer for local variables in frame states.
      
      The main idea is to use the AstGraphBuilder::Environment class to build the control flow graph, and record local variable loads, stores and checkpoints in the CFG basic blocks (LivenessAnalyzerBlock class).
      
      After the graph building finishes, we run a simple data flow analysis over the CFG to figure out liveness of each local variable at each checkpoint. Finally, we run a pass over all the checkpoints and replace dead local variables in the frame states with the 'undefined' value.
      
      Performance numbers for Embenchen are below.
      
      ----------- box2d.js
      Current --turbo-deoptimization: EmbenchenBox2d(RunTime): 11265 ms.
      d8-master --turbo-deoptimization: EmbenchenBox2d(RunTime): 11768 ms.
      d8-master: EmbenchenBox2d(RunTime): 10996 ms.
      ----------- bullet.js
      Current --turbo-deoptimization: EmbenchenBullet(RunTime): 17049 ms.
      d8-master --turbo-deoptimization: EmbenchenBullet(RunTime): 17384 ms.
      d8-master: EmbenchenBullet(RunTime): 16153 ms.
      ----------- copy.js
      Current --turbo-deoptimization: EmbenchenCopy(RunTime): 4877 ms.
      d8-master --turbo-deoptimization: EmbenchenCopy(RunTime): 4938 ms.
      d8-master: EmbenchenCopy(RunTime): 4940 ms.
      ----------- corrections.js
      Current --turbo-deoptimization: EmbenchenCorrections(RunTime): 7068 ms.
      d8-master --turbo-deoptimization: EmbenchenCorrections(RunTime): 6718 ms.
      d8-master: EmbenchenCorrections(RunTime): 6858 ms.
      ----------- fannkuch.js
      Current --turbo-deoptimization: EmbenchenFannkuch(RunTime): 4167 ms.
      d8-master --turbo-deoptimization: EmbenchenFannkuch(RunTime): 4608 ms.
      d8-master: EmbenchenFannkuch(RunTime): 4149 ms.
      ----------- fasta.js
      Current --turbo-deoptimization: EmbenchenFasta(RunTime): 9981 ms.
      d8-master --turbo-deoptimization: EmbenchenFasta(RunTime): 9848 ms.
      d8-master: EmbenchenFasta(RunTime): 9640 ms.
      ----------- lua_binarytrees.js
      Current --turbo-deoptimization: EmbenchenLuaBinaryTrees(RunTime): 11571 ms.
      d8-master --turbo-deoptimization: EmbenchenLuaBinaryTrees(RunTime): 13089 ms.
      d8-master: EmbenchenLuaBinaryTrees(RunTime): 10957 ms.
      ----------- memops.js
      Current --turbo-deoptimization: EmbenchenMemOps(RunTime): 7766 ms.
      d8-master --turbo-deoptimization: EmbenchenMemOps(RunTime): 7346 ms.
      d8-master: EmbenchenMemOps(RunTime): 7738 ms.
      ----------- primes.js
      Current --turbo-deoptimization: EmbenchenPrimes(RunTime): 7459 ms.
      d8-master --turbo-deoptimization: EmbenchenPrimes(RunTime): 7453 ms.
      d8-master: EmbenchenPrimes(RunTime): 7451 ms.
      ----------- skinning.js
      Current --turbo-deoptimization: EmbenchenSkinning(RunTime): 15564 ms.
      d8-master --turbo-deoptimization: EmbenchenSkinning(RunTime): 15611 ms.
      d8-master: EmbenchenSkinning(RunTime): 15583 ms.
      ----------- zlib.js
      Current --turbo-deoptimization: EmbenchenZLib(RunTime): 10825 ms.
      d8-master --turbo-deoptimization: EmbenchenZLib(RunTime): 11180 ms.
      d8-master: EmbenchenZLib(RunTime): 10823 ms.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/949743002
      
      Cr-Commit-Position: refs/heads/master@{#27232}
      ca3abde2
  22. 16 Mar, 2015 1 commit
    • jarin's avatar
      [turbofan] Cache for reusing parts of value vector nodes in frame states. · cd67e97a
      jarin authored
      Instead of the current approach of storing flat vectors in frame states (and possibly reusing the last vector in AST graph builder), this change list builds a tree for the values and tries to reuse the nodes for different frame states. At the moment, we only use this for the local variable part of frame state, but nothing prevents us from using this for all parts.
      
      This change provides two new classes: one for creating the tree (StateValuesCache) and one for iterating the trees (StateValuesAccess).
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1008213002
      
      Cr-Commit-Position: refs/heads/master@{#27222}
      cd67e97a