1. 08 Aug, 2016 2 commits
    • bmeurer's avatar
      [turbofan] Also consume number type feedback for abstract equality. · b12a51c1
      bmeurer authored
      This allows us to consume the type hints gathered by the CompareIC for
      the abstract equality and inequality operators. We need to distinguish
      Number and NumberOrOddball feedback now, as abstract equality doesn't
      truncate null and undefined to Number.
      
      R=epertoso@chromium.org
      BUG=v8:4583
      
      Review-Url: https://codereview.chromium.org/2222983002
      Cr-Commit-Position: refs/heads/master@{#38432}
      b12a51c1
    • bmeurer's avatar
      [turbofan] Add initial support for growing stores. · e6822a83
      bmeurer authored
      Introduce a dedicated MaybeGrowFastElements simplified operator, which
      tries to grow a fast elements backing store for a given element that
      should be added to an array/object. Use that to lower a growing keyed
      store to a sequence of
      
       1) check index is a valid array index,
       2) check stored value,
       3) maybe grow elements backing store (and deoptimize if it would
          normalize), and
       4) store the actual element.
      
      The actual growing is done by two dedicated GrowFastDoubleElements
      and GrowFastSmiOrObjectElements builtins, which are very similar to
      the GrowArrayElementsStub that is used by Crankshaft.
      
      Drive-by-fix: Turn CopyFixedArray into CopyFastSmiOrObjectElements
      builtin, similar to the new growing builtins, so we don't need to
      inline the store+write barrier for the elements into all optimized
      code objects anymore.
      
      Also fix a bug in the OperationTyper for NumberSilenceNaN, which was
      triggered by this change.
      
      BUG=v8:5272
      
      Review-Url: https://codereview.chromium.org/2227493002
      Cr-Commit-Position: refs/heads/master@{#38418}
      e6822a83
  2. 05 Aug, 2016 4 commits
  3. 03 Aug, 2016 3 commits
  4. 02 Aug, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce initial support for TypedArrays. · 66f2d3bd
      bmeurer authored
      This adds support for lowering keyed access to JSTypedArray objects to
      element loads and stores instead of IC calls. There's still a lot of
      room for improvement, but the improvements can be done incrementally
      later.
      
      We add a dedicated UnsafePointerAdd operator, which sits in the effect
      chain, and does the (GC invisible) computation of addresses that are
      potentially inside HeapObjects. Also there's now a dedicated Retain
      operator, which ensures that we retain a certain tagged value, which is
      necessary to ensure that we keep a JSArrayBuffer alive as long as we
      might still potentially access elements in its backing store.
      
      R=epertoso@chromium.org
      
      Review-Url: https://codereview.chromium.org/2203693002
      Cr-Commit-Position: refs/heads/master@{#38235}
      66f2d3bd
  5. 30 Jul, 2016 1 commit
  6. 29 Jul, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce a dedicated CheckMaps simplified operator. · 8201579e
      bmeurer authored
      So far we always create explicit control flow for map checks during
      JSNativeContextSpecialization, or in the monomorphic case we used a
      CheckIf combined with a map comparison. In either case we cannot
      currently effectively utilize the map check information during load
      elimination to optimize (polymorphic) map checks and elements kind
      transitions.
      
      With the introduction of CheckMaps, we can now start optimizing map
      checks in a more effective fashion. This CL doesn't change anything
      in that direction yet, but merely changes the fundamental mechanism.
      
      This also removes the stable map optimization from the Typer, where
      it was always a bit odd, and puts it into the typed lowering and
      the native context specialization instead.
      
      R=epertoso@chromium.org
      BUG=v8:4930,v8:5141
      
      Review-Url: https://codereview.chromium.org/2196653002
      Cr-Commit-Position: refs/heads/master@{#38166}
      8201579e
  7. 27 Jul, 2016 3 commits
  8. 20 Jul, 2016 2 commits
  9. 19 Jul, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce a TransitionElementsKind simplified operator. · 908cd09f
      bmeurer authored
      Instead of wriring the elements kind transitions into the control flow
      early on, we do instead put this marker into the effect chain, so that
      the elements transitions are visible to the LoadElimination and can
      thus be optimized properly there.
      
      This CL itself doesn't add any of those optimizations, but just adds
      the foundations to make them possible later.
      
      R=jarin@chromium.org
      BUG=v8:4930,v8:5141
      
      Review-Url: https://codereview.chromium.org/2164573003
      Cr-Commit-Position: refs/heads/master@{#37869}
      908cd09f
  10. 18 Jul, 2016 2 commits
    • mvstanton's avatar
      [Turbofan]: Eliminate the check for -0 if it's not possible/observable. · 47aaac64
      mvstanton authored
      In int32 multiplication, if we have a positive integer as input, then we know we can't produce a -0 answer. The same is true if truncation is applied (x * y | 0). Without this information, we have to rather annoyingly check if the result of multiplication is 0, then OR the inputs to check for negativity, and possibly return -0. In TurboFan, we'll deopt in this case.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2154073002
      Cr-Commit-Position: refs/heads/master@{#37831}
      47aaac64
    • bmeurer's avatar
      [turbofan] Add support for eager/soft deoptimization reasons. · db635d5b
      bmeurer authored
      So far TurboFan wasn't adding the deoptimization reasons for eager/soft
      deoptimization exits that can be used by either the DevTools profiler or
      the --trace-deopt flag. This adds basic support for deopt reasons on
      Deoptimize, DeoptimizeIf and DeoptimizeUnless nodes and threads through
      the reasons to the code generation.
      
      Also moves the DeoptReason to it's own file (to resolve include cycles)
      and drops unused reasons.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2161543002
      Cr-Commit-Position: refs/heads/master@{#37823}
      db635d5b
  11. 16 Jul, 2016 1 commit
  12. 14 Jul, 2016 1 commit
  13. 13 Jul, 2016 2 commits
  14. 12 Jul, 2016 2 commits
  15. 11 Jul, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce CheckedInt32Div and CheckedInt32Mod operators. · 03bde266
      bmeurer authored
      Consume Smi/Signed32 feedback for division and modulus and introduce
      appropriate checked operators. This is especially important for modulus
      where the Float64Mod operator is significantly slower than Int32Mod on
      most platforms. For division it's mostly important to propagate
      integerness, i.e. to avoid follow-up conversions between float and
      int32.
      
      Drive-by-fix: Use Int32Mod for the ModulusStub (and the bytecode handler)
      when the inputs are both Smi.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2138633002
      Cr-Commit-Position: refs/heads/master@{#37621}
      03bde266
  16. 30 Jun, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce CheckIf simplified operator. · 483291d2
      bmeurer authored
      This adds a new CheckIf operator and changes all direct uses of
      DeoptimizeIf and DeoptimizeUnless on the JavaScript level to use
      CheckIf (or one of the more concrete check operators) instead.
      This way we do not depend on particular frame states, but the
      effect/control linearizer will assign an appropriate frame
      state instead.
      
      R=jarin@chromium.org
      BUG=v8:5141
      
      Review-Url: https://codereview.chromium.org/2115513002
      Cr-Commit-Position: refs/heads/master@{#37423}
      483291d2
  17. 29 Jun, 2016 1 commit
  18. 28 Jun, 2016 1 commit
  19. 21 Jun, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Address the useless overflow bit materialization. · 00889cc2
      bmeurer authored
      Add control dependencies to Projection and Int32Add/SubWithOverflow
      operators, to prevent the scheduler from moving the Projection nodes
      into the wrong place. This way the instruction selection can combine
      the Int32Add/SubWithOverflow operations with the DeoptimizeIf and/or
      DeoptimizeUnless nodes. This needs new operators CheckedInt32Add and
      CheckedInt32Sub so that we can delay the actual lowering until the
      effect/control linearizer.
      
      This also makes CheckIf operator obsolete, so we can drop it.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2082993002
      Cr-Commit-Position: refs/heads/master@{#37148}
      00889cc2
  20. 20 Jun, 2016 3 commits
    • bmeurer's avatar
      [turbofan] Introduce CheckTaggedSigned and CheckTaggedPointer operators. · 99eb5686
      bmeurer authored
      These are used to check for Smi or HeapObject, and we use them
      appropriately in JSNativeContextSpecialization, so we don't need
      to introduce dependencies on concrete control flow and/or concrete
      frame states.
      
      They will be optimized by a proper check elimination reducer,
      which will be added in a separate CL.
      
      R=jarin@chromium.org
      BUG=v8:4470
      
      Review-Url: https://codereview.chromium.org/2082523002
      Cr-Commit-Position: refs/heads/master@{#37096}
      99eb5686
    • machenbach's avatar
      Revert of [turbofan] Introduce CheckUnless. (patchset #1 id:1 of... · 46c21b2c
      machenbach authored
      Revert of [turbofan] Introduce CheckUnless. (patchset #1 id:1 of https://codereview.chromium.org/2080113002/ )
      
      Reason for revert:
      [Sheriff] Speculative revert: Seems to lead to devtools crashes:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/5259
      
      Original issue's description:
      > [turbofan] Introduce CheckUnless.
      >
      > Similarly to CheckIf, CheckUnless is a deoptimization without a specific
      > frame state. A frame state is assigned during effect-control linearization
      > (and CheckUnless is turned into DeoptimizeUnless).
      >
      > At the moment, the new operator is only used at one place in native context
      > specialization, but we should use it everywhere. The advantage of
      > CHeckUnless is that it avoids non-truncating uses of values by frame
      > states. This particular change is aimed at Octane's crypto, where this
      > enables to turn one NumberMultiply into Int32Mul, and thus improve
      > the score by more than 10% (it also needs minus zero truncation and
      > typing to be improved, but those CLs are already in flight).
      >
      > BUG=v8:4470
      > R=bmeurer@chromium.org
      >
      > Committed: https://crrev.com/85fde59d538e0dcaf461108086c2f7cf904f567a
      > Cr-Commit-Position: refs/heads/master@{#37085}
      
      TBR=bmeurer@chromium.org,jarin@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4470
      
      Review-Url: https://codereview.chromium.org/2078333002
      Cr-Commit-Position: refs/heads/master@{#37090}
      46c21b2c
    • jarin's avatar
      [turbofan] Introduce CheckUnless. · 85fde59d
      jarin authored
      Similarly to CheckIf, CheckUnless is a deoptimization without a specific
      frame state. A frame state is assigned during effect-control linearization
      (and CheckUnless is turned into DeoptimizeUnless).
      
      At the moment, the new operator is only used at one place in native context
      specialization, but we should use it everywhere. The advantage of
      CHeckUnless is that it avoids non-truncating uses of values by frame
      states. This particular change is aimed at Octane's crypto, where this
      enables to turn one NumberMultiply into Int32Mul, and thus improve
      the score by more than 10% (it also needs minus zero truncation and
      typing to be improved, but those CLs are already in flight).
      
      BUG=v8:4470
      R=bmeurer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2080113002
      Cr-Commit-Position: refs/heads/master@{#37085}
      85fde59d
  21. 15 Jun, 2016 3 commits
  22. 14 Jun, 2016 2 commits
  23. 10 Jun, 2016 1 commit