1. 04 Jan, 2017 1 commit
  2. 30 Nov, 2016 1 commit
  3. 27 Sep, 2016 1 commit
  4. 16 Sep, 2016 1 commit
  5. 13 Sep, 2016 1 commit
  6. 10 Aug, 2016 1 commit
  7. 08 Aug, 2016 1 commit
  8. 04 Aug, 2016 1 commit
  9. 03 Aug, 2016 1 commit
  10. 25 Jul, 2016 1 commit
  11. 22 Jul, 2016 1 commit
  12. 14 Jul, 2016 1 commit
  13. 01 Jul, 2016 1 commit
    • bmeurer's avatar
      [builtins] Unify most of the remaining Math builtins. · 0a0fe8fb
      bmeurer authored
      Import fdlibm versions of acos, acosh, asin and asinh, which are more
      precise and produce the same result across platforms (we were using
      libm versions for asin and acos so far, where both speed and precision
      depended on the operating system so far). Introduce appropriate TurboFan
      operators for these functions and use them both for inlining and for the
      generic builtin.
      
      Also migrate the Math.imul and Math.fround builtins to TurboFan builtins
      to ensure that their behavior is always exactly the same as the inlined
      TurboFan version (i.e. C++ truncation semantics for double to float
      don't necessarily meet the JavaScript semantics).
      
      For completeness, also migrate Math.sign, which can even get some nice
      love in TurboFan.
      
      Drive-by-fix: Some alpha-sorting on the Math related functions, and
      cleanup the list of Math intrinsics that we have to export via the
      native context currently.
      
      BUG=v8:3266,v8:3496,v8:3509,v8:3952,v8:5169,v8:5170,v8:5171,v8:5172
      TBR=rossberg@chromium.org
      R=franzih@chromium.org
      
      Review-Url: https://codereview.chromium.org/2116753002
      Cr-Commit-Position: refs/heads/master@{#37476}
      0a0fe8fb
  14. 30 Jun, 2016 1 commit
  15. 28 Jun, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce Float64Pow and NumberPow operators. · e607e12e
      bmeurer authored
      Introduce a new machine operator Float64Pow that for now is backed by
      the existing MathPowStub to start the unification of Math.pow, and at
      the same time address the main performance issue that TurboFan still has
      with the imaging-darkroom benchmark in Kraken.
      
      Also migrate the Math.pow builtin itself to a TurboFan builtin and
      remove a few hundred lines of hand-written platform code for special
      handling of the fullcodegen Math.pow version.
      
      BUG=v8:3599,v8:5086,v8:5157
      
      Review-Url: https://codereview.chromium.org/2103733003
      Cr-Commit-Position: refs/heads/master@{#37323}
      e607e12e
  16. 22 Jun, 2016 1 commit
  17. 20 Jun, 2016 1 commit
    • bmeurer's avatar
      [builtins] Introduce proper Float64Tan operator. · c87168bc
      bmeurer authored
      Import base::ieee754::tan() from fdlibm and introduce Float64Tan TurboFan
      operator based on that, similar to what we do for Float64Cos and Float64Sin.
      Rewrite Math.tan() as TurboFan builtin and use those operators to also
      inline Math.tan() into optimized TurboFan functions.
      
      Drive-by-fix: Kill the %_ConstructDouble intrinsics, and provide only
      the %ConstructDouble runtime entry for writing tests.
      
      BUG=v8:5086,v8:5126
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2083453002
      Cr-Commit-Position: refs/heads/master@{#37087}
      c87168bc
  18. 17 Jun, 2016 4 commits
  19. 16 Jun, 2016 3 commits
  20. 13 Jun, 2016 2 commits
    • bmeurer's avatar
      [builtins] Introduce proper Float64Atan and Float64Atan2 operators. · 89d8c57b
      bmeurer authored
      Import base::ieee754::atan() and base::ieee754::atan2() from fdlibm and
      introduce Float64Atan and Float64Atan2 TurboFan operators based on those,
      similar to what we already did for Float64Log and Float64Log1p. Rewrite
      Math.atan() and Math.atan2() as TurboFan builtin and use the operators
      to also inline Math.atan() and Math.atan2() into optimized TurboFan functions.
      
      R=yangguo@chromium.org
      BUG=v8:5086,v8:5095
      
      Review-Url: https://codereview.chromium.org/2065503002
      Cr-Commit-Position: refs/heads/master@{#36916}
      89d8c57b
    • bmeurer's avatar
      [builtins] Introduce proper Float64Log1p operator. · 7ceed92a
      bmeurer authored
      Import base::ieee754::log1p() from fdlibm and introduce a Float64Log1p
      TurboFan operator based on that, similar to what we do for Float64Log.
      Rewrite Math.log1p() as TurboFan builtin and use that operator to also
      inline Math.log1p() into optimized TurboFan functions.
      
      Also unify the handling of the special IEEE 754 functions somewhat in
      the TurboFan backends. At some point we can hopefully express this
      completely in the InstructionSelector (once we have an idea what to do
      with the ST(0) return issue on IA-32/X87).
      
      Drive-by-fix: Add some more test coverage for the log function.
      
      R=yangguo@chromium.org
      BUG=v8:5086,v8:5092
      
      Review-Url: https://codereview.chromium.org/2060743002
      Cr-Commit-Position: refs/heads/master@{#36914}
      7ceed92a
  21. 10 Jun, 2016 1 commit
    • bmeurer's avatar
      [builtins] Introduce proper base::ieee754::log. · d0c7775d
      bmeurer authored
      This switches Math.log to use an fdlibm based version of log, imported
      as base::ieee754::log, and use that consistently everywhere, i.e. change
      the Float64Log TurboFan operators on Intel to use the C++ implementation
      as well (same for Crankshaft).
      
      R=yangguo@chromium.org
      BUG=v8:5065,v8:5086
      
      Review-Url: https://codereview.chromium.org/2053893003
      Cr-Commit-Position: refs/heads/master@{#36880}
      d0c7775d
  22. 03 Jun, 2016 1 commit
    • bmeurer's avatar
      [builtins] Migrate Math.log to TurboFan. · f2da19fe
      bmeurer authored
      Introduce a dedicated Float64Log machine operator, that is either
      implemented by a direct C call or by platform specific code, i.e.
      using the FPU on x64 and ia32.
      
      This operator is used to implement Math.log as a proper TurboFan
      builtin on top of the CodeStubAssembler.
      
      Also introduce a NumberLog simplified operator on top of Float64Log
      and use that for the fast inline path of Math.log inside TurboFan
      optimized code.
      
      BUG=v8:5065
      
      Review-Url: https://codereview.chromium.org/2029413005
      Cr-Commit-Position: refs/heads/master@{#36703}
      f2da19fe
  23. 26 Apr, 2016 1 commit
  24. 24 Apr, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce TruncateTaggedToWord32 simplified operator. · 0231a7ef
      bmeurer authored
      This allows us to get rid of the "push TruncateFloat64ToInt32 into Phi"
      trick that was used in the MachineOperatorReducer to combine the
      ChangeTaggedToFloat64 and TruncateFloat64ToInt32 operations. Instead of
      doing that later, we can just introduce the proper operator during the
      representation selection directly.
      
      Also separate the TruncateFloat64ToInt32 machine operator, which had two
      different meanings depending on a flag (either JavaScript truncation or
      C++ style round to zero). Now there's a TruncateFloat64ToWord32 which
      represents the JavaScript truncation (implemented via TruncateDoubleToI
      macro + code stub) and the RoundFloat64ToInt32, which implements the C++
      round towards zero operation (in the same style as the other WebAssembly
      driven Round* machine operators).
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1919513002
      
      Cr-Commit-Position: refs/heads/master@{#35743}
      0231a7ef
  25. 11 Jan, 2016 1 commit
  26. 11 Dec, 2015 1 commit
  27. 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
  28. 26 Nov, 2015 3 commits
    • bmeurer's avatar
      Revert of binary-operator-reducer: reduce mul+div(shift) (patchset #11... · 5d18e93b
      bmeurer authored
      Revert of binary-operator-reducer: reduce mul+div(shift) (patchset #11 id:200001 of https://codereview.chromium.org/1350223006/ )
      
      Reason for revert:
      This is also unsound for the reasons outlined in
      https://codereview.chromium.org/1473073004/
      Will help Fedor to implement a solution based on simplified operators.
      
      Original issue's description:
      > binary-operator-reducer: reduce mul+div(shift)
      >
      > Reduction Input:
      >
      >     ChangeInt32ToFloat64=>          TruncateFloat64ToInt32
      >                          Float64Mul=>
      >     ChangeInt32ToFloat64=>          Float64Div=>TruncateFloat64ToInt32
      >
      > Output:
      >
      >          =>  TruncateInt64ToInt32
      > Int64Mul
      >          =>  Int64Shr => TruncateInt64ToInt32
      >
      > Test code:
      >
      >     function mul(a, b) {
      >       var l = a & 0x3ffffff;
      >       var h = b & 0x3ffffff;
      >       var m = l * h;
      >
      >       var rl = m & 0x3ffffff;
      >       var rh = (m / 0x4000000) | 0;
      >
      >       return rl | rh;
      >     }
      >
      >     mul(1, 2);
      >     var a0 = mul(0x3ffffff, 0x3ffffff);
      >     mul(0x0, 0x0);
      >     %OptimizeFunctionOnNextCall(mul);
      >     var a1 = mul(0x3ffffff, 0x3ffffff);
      >
      >     print(a0 + ' == ' + a1);
      >
      > BUG=
      > R=mstarzinger@chromium.org
      >
      > Committed: https://crrev.com/461e5b49d022335a7fc4e9d172397a4bd48b93d4
      > Cr-Commit-Position: refs/heads/master@{#31899}
      
      TBR=mstarzinger@chromium.org,danno@chromium.org,titzer@chromium.org,fedor@indutny.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1478923002
      
      Cr-Commit-Position: refs/heads/master@{#32313}
      5d18e93b
    • bmeurer's avatar
      Revert of [machine-operator-reducer] fix float truncation (patchset #8... · dc554059
      bmeurer authored
      Revert of [machine-operator-reducer] fix float truncation (patchset #8 id:140001 of https://codereview.chromium.org/1433353006/ )
      
      Reason for revert:
      This is also unsound for the reasons outlined in
      https://codereview.chromium.org/1473073004/
      Will reland the mjsunit test separately and help Fedor to implement a solution based on simplified operators.
      
      Original issue's description:
      > [machine-operator-reducer] fix float truncation
      >
      > Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with
      > `value`. Generally, `value` may have a range bigger than the one that
      > could fit into Int32. Replace it with `TruncateInt64ToInt32(value)`
      > instead, and only if the `value` fits into Float64 without precision
      > loss.
      >
      > Add missing mjsunit test for 52bit multiplication/division optimization
      > that has landed in refs/heads/master@{#31899}.
      >
      > BUG=
      > R=titzer@google.com
      >
      > Committed: https://crrev.com/64efa2a904773816968992628f0bf0f1b7ae82be
      > Cr-Commit-Position: refs/heads/master@{#32227}
      
      TBR=titzer@chromium.org,fedor@indutny.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1468313009
      
      Cr-Commit-Position: refs/heads/master@{#32312}
      dc554059
    • bmeurer's avatar
      Revert of [compiler] merge binary-operator-reducer (patchset #2 id:20001 of... · b0c179da
      bmeurer authored
      Revert of [compiler] merge binary-operator-reducer (patchset #2 id:20001 of https://codereview.chromium.org/1473073004/ )
      
      Reason for revert:
      Unsound use of types in the MachineOperatorReducer. Will work on a sound solution with Fedor.
      
      Original issue's description:
      > [compiler] merge binary-operator-reducer
      >
      > Merge BinaryOperatorReducer into the MachineOperatorReducer class.
      > It does not need `Revisit()` calls, because the newly inserted nodes are
      > visited anyway, and there are no other methods that need AdvancedReducer
      > there.
      >
      > BUG=
      > R=titzer@chromium.org
      >
      > Committed: https://crrev.com/993ba9d2529a6401b3040b9263f8d06db7dbb4f1
      > Cr-Commit-Position: refs/heads/master@{#32298}
      
      TBR=titzer@chromium.org,fedor@indutny.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1476763006
      
      Cr-Commit-Position: refs/heads/master@{#32310}
      b0c179da
  29. 25 Nov, 2015 1 commit
    • fedor's avatar
      [compiler] merge binary-operator-reducer · 993ba9d2
      fedor authored
      Merge BinaryOperatorReducer into the MachineOperatorReducer class.
      It does not need `Revisit()` calls, because the newly inserted nodes are
      visited anyway, and there are no other methods that need AdvancedReducer
      there.
      
      BUG=
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1473073004
      
      Cr-Commit-Position: refs/heads/master@{#32298}
      993ba9d2
  30. 24 Nov, 2015 1 commit
    • fedor's avatar
      [machine-operator-reducer] fix float truncation · 64efa2a9
      fedor authored
      Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with
      `value`. Generally, `value` may have a range bigger than the one that
      could fit into Int32. Replace it with `TruncateInt64ToInt32(value)`
      instead, and only if the `value` fits into Float64 without precision
      loss.
      
      Add missing mjsunit test for 52bit multiplication/division optimization
      that has landed in refs/heads/master@{#31899}.
      
      BUG=
      R=titzer@google.com
      
      Review URL: https://codereview.chromium.org/1433353006
      
      Cr-Commit-Position: refs/heads/master@{#32227}
      64efa2a9
  31. 09 Nov, 2015 1 commit
    • fedor's avatar
      binary-operator-reducer: reduce mul+div(shift) · 461e5b49
      fedor authored
      Reduction Input:
      
          ChangeInt32ToFloat64=>          TruncateFloat64ToInt32
                               Float64Mul=>
          ChangeInt32ToFloat64=>          Float64Div=>TruncateFloat64ToInt32
      
      Output:
      
               =>  TruncateInt64ToInt32
      Int64Mul
               =>  Int64Shr => TruncateInt64ToInt32
      
      Test code:
      
          function mul(a, b) {
            var l = a & 0x3ffffff;
            var h = b & 0x3ffffff;
            var m = l * h;
      
            var rl = m & 0x3ffffff;
            var rh = (m / 0x4000000) | 0;
      
            return rl | rh;
          }
      
          mul(1, 2);
          var a0 = mul(0x3ffffff, 0x3ffffff);
          mul(0x0, 0x0);
          %OptimizeFunctionOnNextCall(mul);
          var a1 = mul(0x3ffffff, 0x3ffffff);
      
          print(a0 + ' == ' + a1);
      
      BUG=
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1350223006
      
      Cr-Commit-Position: refs/heads/master@{#31899}
      461e5b49
  32. 24 Sep, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Make Node::set_op safer via wrapper. · da9c42dd
      mstarzinger authored
      This introduces the NodeProperties::ChangeOp helper which guards node
      operator changes so that additional checking can be done without any
      additional dependencies being pulled into the Node class. For now only
      the input count is checked, but additional checking might follow.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1366753003
      
      Cr-Commit-Position: refs/heads/master@{#30916}
      da9c42dd