1. 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
  2. 27 Jun, 2016 1 commit
  3. 24 Jun, 2016 2 commits
    • bbudge's avatar
      [Turbofan] Add the concept of aliasing to RegisterConfiguration. · a933b704
      bbudge authored
      - Adds the concept of FP register aliasing to RegisterConfiguration.
      - Changes RegisterAllocator to distinguish between FP representations
      when allocating.
      - Changes LinearScanAllocator to detect interference when FP register
      aliasing is combining, as on ARM.
      - Changes ARM code generation to allow all registers s0 - s31 to be
      accessed.
      - Adds unit tests for RegisterConfiguration, mostly to test aliasing
      calculations.
      
      LOG=N
      BUG=v8:4124
      
      Review-Url: https://codereview.chromium.org/2086653003
      Cr-Commit-Position: refs/heads/master@{#37251}
      a933b704
    • balazs.kilvady's avatar
      Fix '[tests] Don't test moves between different reps in test-gap-resolver.cc' · 5cda2db7
      balazs.kilvady authored
      Port fc59eb8a
      
      Original commit message:
      Moves between operands with different representations shouldn't happen,
      so don't test them. This makes it easier to modify canonicalization to
      differentiate between floating point types, which is needed to support
      floating point register aliasing for ARM and MIPS.
      
      This change also expands tests to include explicit FP moves (both register and stack slot).
      
      LOG=N
      BUG=v8:4124
      BUG=chromium:622619
      
      Review-Url: https://codereview.chromium.org/2090993002
      Cr-Commit-Position: refs/heads/master@{#37241}
      5cda2db7
  4. 22 Jun, 2016 1 commit
  5. 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
  6. 17 Jun, 2016 5 commits
  7. 16 Jun, 2016 4 commits
  8. 14 Jun, 2016 2 commits
  9. 13 Jun, 2016 4 commits
    • cbruni's avatar
      Revert of Replace all remaining Oddball checks with new function (patchset #10... · 33b8bc24
      cbruni authored
      Revert of Replace all remaining Oddball checks with new function (patchset #10 id:180001 of https://codereview.chromium.org/2043183003/ )
      
      Reason for revert:
      failing tests
      
      Original issue's description:
      > Replace all remaining Oddball checks with new function
      >
      > This CL removes the IsUndefined() and Co. methods from Object and HeapObject.
      > The new method all take the isolate as parameter.
      >
      > BUG=
      >
      > Committed: https://crrev.com/ccefb3ae5fe967288d568013fb04e8761eafebc5
      > Cr-Commit-Position: refs/heads/master@{#36921}
      
      TBR=mstarzinger@chromium.org,verwaest@chromium.org,yangguo@chromium.org,ahaas@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review-Url: https://codereview.chromium.org/2060213002
      Cr-Commit-Position: refs/heads/master@{#36923}
      33b8bc24
    • cbruni's avatar
      Replace all remaining Oddball checks with new function · ccefb3ae
      cbruni authored
      This CL removes the IsUndefined() and Co. methods from Object and HeapObject.
      The new method all take the isolate as parameter.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2043183003
      Cr-Commit-Position: refs/heads/master@{#36921}
      ccefb3ae
    • 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
  10. 10 Jun, 2016 2 commits
    • jarin's avatar
      [turbofan] Introduce PlainPrimitiveToNumber. · 2890137b
      jarin authored
      This should solve the problem with missing checkpoints after JSToNumber
      (PlainPrimitiveToNumber is marked no-write, so the frame-state
      propagation should see through it.)
      
      Unfortunately, this also duplicates the word32- and float64-truncation
      magic that we have for JSToNumber in "simplified lowering".
      
      Review-Url: https://codereview.chromium.org/2059653002
      Cr-Commit-Position: refs/heads/master@{#36881}
      2890137b
    • 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
  11. 09 Jun, 2016 1 commit
  12. 06 Jun, 2016 1 commit
  13. 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
  14. 02 Jun, 2016 3 commits
    • ishell's avatar
      [stubs] Extend HasProperty stub with dictionary-mode, string wrapper and... · 3c4f903e
      ishell authored
      [stubs] Extend HasProperty stub with dictionary-mode, string wrapper and double-elements objects support.
      
      This CL also replaces some Branch() usages with GotoIf/GotoUnless.
      
      (This is a reland after fixing issues that prevented this CL from landing in other CLs).
      
      BUG=v8:2743
      LOG=Y
      
      Committed: https://crrev.com/24066b6df4259b302edfa1db884c479008776a7e
      Cr-Commit-Position: refs/heads/master@{#36657}
      
      Review-Url: https://codereview.chromium.org/1995453002
      Cr-Commit-Position: refs/heads/master@{#36686}
      3c4f903e
    • ishell's avatar
      Move test/cctest/compiler/test-code-stub-assembler.cc to test/cctest directory. · 5a5c115e
      ishell authored
      ... since CodeStubAssembler does not belong to v8::internal::compiler namespace anymore.
      
      Review-Url: https://codereview.chromium.org/2035533003
      Cr-Commit-Position: refs/heads/master@{#36683}
      5a5c115e
    • jarin's avatar
      [turbofan] Initial version of number type feedback. · 216bcf9f
      jarin authored
      This introduces optimized number operations based on type feedback.
      
      Summary of changes:
      
      1. Typed lowering produces SpeculativeNumberAdd/Subtract for JSAdd/Subtract if
         there is suitable feedback. The speculative nodes are connected to both the
         effect chain and the control chain and they retain the eager frame state.
      
      2. Simplified lowering now executes in three phases:
        a. Propagation phase computes truncations by traversing the graph from uses to
           definitions until checkpoint is reached. It also records type-check decisions
           for later typing phase, and computes representation.
        b. The typing phase computes more precise types base on the speculative types (and recomputes
           representation for affected nodes).
        c. The lowering phase performs lowering and inserts representation changes and/or checks.
      
      3. Effect-control linearization lowers the checks to machine graphs.
      
      Notes:
      
      - SimplifiedLowering will be refactored to have handling of each operation one place and
        with clearer input/output protocol for each sub-phase. I would prefer to do this once
        we have more operations implemented, and the pattern is clearer.
      
      - The check operations (Checked<A>To<B>) should have some flags that would affect
        the kind of truncations that they can handle. E.g., if we know that a node produces
        a number, we can omit the oddball check in the CheckedTaggedToFloat64 lowering.
      
      - In future, we want the typer to reuse the logic from OperationTyper.
      
      BUG=v8:4583
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1921563002
      Cr-Commit-Position: refs/heads/master@{#36674}
      216bcf9f
  15. 01 Jun, 2016 3 commits
  16. 31 May, 2016 1 commit
  17. 27 May, 2016 4 commits
  18. 25 May, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Remove the EmptyFrameState caching on JSGraph. · dd609a5d
      bmeurer authored
      Caching nodes with mutable inputs is a bad idea and already blew up
      twice now, so in order to avoid further breakage, let's kill the
      EmptyFrameState caching on JSGraph completely and only cache the empty
      state values there.
      
      We can remove the hacking from JSTypedLowering completely once we have
      the PlainPrimitiveToNumber in action.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2006423003
      Cr-Commit-Position: refs/heads/master@{#36511}
      dd609a5d
  19. 24 May, 2016 1 commit
    • epertoso's avatar
      [x64/ia32] Deal with the non-transitivity of InstructionSelector::CanCover()... · 0d22e7e4
      epertoso authored
      [x64/ia32] Deal with the non-transitivity of InstructionSelector::CanCover() when folding loads into branches.
      
      Sequences like:
      
      1: Load[kRepWord32|kTypeInt32](<address>, ...)
      2: Word32And(1, <constant>)
      3: Word32Equal(2, <another constant>)
      4: Store[(kRepWord32 : NoWriteBarrier)](<address>, <value>)
      5: Branch[None](3, ...) -> B1, B2
      
      where #1 and #4 refer to the same memory location, are problematic because in VisitBranch we assume that 'InstructionSelector::CanCover()' is transitive.
      
      What happens is that CanCover(5, 3) is true (3 is a pure op), and so are CanCover(3, 2), CanCover(2, 1), but the effect level of 5 and 3 never gets checked because 3 is a pure op. Upon VisitBranch, we ended up materializing:
      
      mov [address], <value>
      test [address], <another constant>
      
      With this patch, it becomes:
      
      mov reg, [address]
      mov [address], <value>
      test reg, <another constant>
      
      BUG=chromium:611976
      
      Review-Url: https://codereview.chromium.org/2008493002
      Cr-Commit-Position: refs/heads/master@{#36482}
      0d22e7e4
  20. 20 May, 2016 1 commit