1. 29 Jun, 2016 3 commits
    • georgia.kouveli's avatar
      [arm64] Generate adds/ands. · 317dc057
      georgia.kouveli authored
      Perform the following transformation:
      
          | Before           | After               |
          |------------------+---------------------|
          | add w2, w0, w1   | adds w2, w0, w1     |
          | cmp w2, #0x0     | b.<cond'> <addr>    |
          | b.<cond> <addr>  |                     |
          |------------------+---------------------|
          | add w2, w0, w1   | adds w2, w0, w1     |
          | cmp #0x0, w2     | b.<cond'> <addr>    |
          | b.<cond> <addr>  |                     |
      
      and the same for and instructions instead of add.  When the result of the
      add/and is not used, generate cmn/tst instead. We need to take care with which
      conditions we can handle and what new condition we map them to.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2065243005
      Cr-Commit-Position: refs/heads/master@{#37400}
      317dc057
    • bmeurer's avatar
      [turbofan] Disallow typing for change/checked operators. · 6f920d7d
      bmeurer authored
      There are no useful typing rules for Change and Checked operators, so we
      better make sure we don't run them through the Typer at all.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2107783004
      Cr-Commit-Position: refs/heads/master@{#37382}
      6f920d7d
    • bmeurer's avatar
      [turbofan] Drop the obsolete TypeGuard operator. · be32c055
      bmeurer authored
      The only real use case left for TypeGuard was the renaming inside the
      LoadElimination, but this case only occurs in dead code (guarded by a
      previous Check), so it's not relevant, and we can drop the TypeGuard
      operator completely.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2108793003
      Cr-Commit-Position: refs/heads/master@{#37361}
      be32c055
  2. 28 Jun, 2016 3 commits
  3. 27 Jun, 2016 2 commits
  4. 24 Jun, 2016 1 commit
    • 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
  5. 23 Jun, 2016 2 commits
  6. 22 Jun, 2016 1 commit
  7. 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
  8. 20 Jun, 2016 2 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
    • 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
  9. 17 Jun, 2016 4 commits
  10. 16 Jun, 2016 4 commits
  11. 15 Jun, 2016 1 commit
  12. 14 Jun, 2016 1 commit
  13. 13 Jun, 2016 5 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
    • mtrofin's avatar
      [turbofan] Retiring Greedy Allocator · 8e1ccba3
      mtrofin authored
      We were able to achieve our goals for register allocation independent of
      the allocation algorithm. Performance data so far is inconclusive re. the
      value of the Greedy algorithm, compared to the particular Linear Scan
      implementation we're currently using, and the performance measurement
      techniques we currently use are too imprecise to help with this matter.
      
      Retiring the algorithm to lower maintenance and evolution cost (e.g. lower
      cost of adding aliasing support). Once we improve benchmarking stability,
      and establish a suite sensitive enough for codegen improvement studies,
      we may revive the algorithm, should the need arise.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2060673002
      Cr-Commit-Position: refs/heads/master@{#36912}
      8e1ccba3
  14. 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
  15. 08 Jun, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Do strength reduction for ObjectIsSmi based on inputs. · c91c3961
      bmeurer authored
      Ideally we would have a dedicated MachineRepresentation for Smis during
      representation selection and use that to properly optimize ObjectIsSmi
      (and other ObjectIs<Type> predicates), but that will take some time to
      get that done. So in the meantime we can just do simple (local) strength
      reduction on ObjectIsSmi to avoid Smi checks in the simplest cases at
      least.
      
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2047213002
      Cr-Commit-Position: refs/heads/master@{#36809}
      c91c3961
  16. 06 Jun, 2016 1 commit
  17. 03 Jun, 2016 4 commits
  18. 02 Jun, 2016 2 commits
    • 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
    • Benedikt Meurer's avatar
      [turbofan] Eager frame state gone from JSCallFunction. · bea121aa
      Benedikt Meurer authored
      TBR=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/2038463003 .
      
      Cr-Commit-Position: refs/heads/master@{#36672}
      bea121aa