1. 04 Jan, 2017 1 commit
  2. 03 Nov, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Improve representation selection for HeapObject checking. · 6322bf41
      bmeurer authored
      For lowering CheckHeapObject, always report TaggedPointer representation
      and let the RepresentationChanger come up with a reasonable conversion from
      whatever input representation to TaggedPointer. This way we no longer insert
      the useless ChangeSomethingToTagged and then check the result for HeapObject,
      i.e. mostly reduces the amount of useless code being generated.
      
      Note there are now two operators ChangeFloat64ToTaggedPointer and the old
      ChangeFloat64ToTagged, because their semantics different wrt. the strength
      reduction in the SimplifiedOperatorReducer.
      
      Also set the output MachineRepresentation::kTaggedPointer properly in
      SimplifiedLowering whenever we know that we produce a HeapObject.
      
      R=jarin@chromium.org
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2476593002
      Cr-Commit-Position: refs/heads/master@{#40725}
      6322bf41
  3. 17 Oct, 2016 1 commit
  4. 07 Oct, 2016 1 commit
  5. 29 Sep, 2016 1 commit
  6. 23 Sep, 2016 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Improve representation selection for Smi checking. · dfbb3db5
      Benedikt Meurer authored
      Rename the high-level operators CheckTaggedSigned to CheckSmi and
      CheckTaggedPointer to CheckHeapObject, to better match the naming
      convention (i.e. ObjectIsSmi and CheckSmi, ObjectIsString and
      CheckString, etc.).
      
      For lowering CheckSmi, always report TaggedSigned representation
      and let the RepresentationChanger come up with a reasonable conversion
      from whatever input representation to TaggedSigned. This way we no
      longer insert the useless ChangeSomethingToTagged and then Smi check
      the result sequences, i.e. mostly reduces the amount of useless code
      being generated. But we also observe a few performance improvements
      on some crypto benchmarks.
      
      This would enable us to avoid the Smi canonicalization when going from
      Float64 to Tagged completely and thus match the representation selection
      of Crankshaft in many areas (which might reduce the amount of
      polymorphism until we fix our object model).
      
      A follow-up CL will do the same for CheckHeapObject.
      
      BUG=v8:5267
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/2362173003 .
      
      Cr-Commit-Position: refs/heads/master@{#39654}
      dfbb3db5
  7. 13 Sep, 2016 1 commit
  8. 29 Aug, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Remove the unused asm.js types from TypeCache. · f5a37d13
      bmeurer authored
      For asm.js we now have a dedicated AsmTyper, that uses it's own type
      system (which is tailored towards asm.js), and so we don't need the
      special asm.js types anymore in the TypeCache. This also moves the
      TypeCache into the src/compiler directory, because it doesn't make
      sense to use outside anyways.
      
      TBR=ahaas@chromium.org
      R=jarin@chromium.org
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2289573002
      Cr-Commit-Position: refs/heads/master@{#38964}
      f5a37d13
  9. 11 Aug, 2016 1 commit
  10. 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
  11. 29 Jun, 2016 2 commits
  12. 28 Jun, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce simplified operator NumberAbs. · f50a601f
      bmeurer authored
      Add NumberAbs operator to implement an inline version of Math.abs, that
      can be optimized and eliminated. We don't use any speculation here, but
      for now stick to the information we can infer (this way we avoid the
      inherent deopt loops that Crankshaft has around Math.abs).
      
      CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
      R=jarin@chromium.org
      BUG=v8:5086
      
      Review-Url: https://codereview.chromium.org/2096403002
      Cr-Commit-Position: refs/heads/master@{#37306}
      f50a601f
  13. 22 Jun, 2016 1 commit
  14. 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
  15. 31 May, 2016 1 commit
  16. 18 May, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Turn common Guard operator into simplified TypeGuard. · c5a71f02
      bmeurer authored
      The type guard should never be used after the effect/control
      linearization pass, so making it a simplified operator better
      expresses the intended use. Also this way none of the common
      operators actually has any dependency on the type system.
      
      Drive-by-fix: Properly print the type parameter to a TypeGuard operator.
      
      BUG=chromium:612142
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/1994503002
      Cr-Commit-Position: refs/heads/master@{#36304}
      c5a71f02
  17. 02 May, 2016 3 commits
    • bmeurer's avatar
      [turbofan] Remove left-over change bits from ChangeLowering. · 4aa02441
      bmeurer authored
      Now ChangeLowering is only concerned with lowering memory access and
      allocation operations, and all changes are consistently lowered during
      the effect/control linearization pass. The next step is to move the
      left over lowerings to a pass dedicated to eliminate redundant loads and
      stores, eliminate write barriers, fold and inline allocations.
      
      Drive-by-fix: Rename ChangeBitToBool to ChangeBitToTagged,
      ChangeBoolToBit to ChangeTaggedToBit, and ChangeInt31ToTagged to
      ChangeInt31ToTaggedSigned for consistency.
      
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux64_tsan_rel
      
      Committed: https://crrev.com/ceca5ae308bddda166651c654f96d71d74f617d0
      Cr-Commit-Position: refs/heads/master@{#35924}
      
      Review-Url: https://codereview.chromium.org/1941673002
      Cr-Commit-Position: refs/heads/master@{#35929}
      4aa02441
    • machenbach's avatar
      Revert of [turbofan] Remove left-over change bits from ChangeLowering.... · b4c3864b
      machenbach authored
      Revert of [turbofan] Remove left-over change bits from ChangeLowering. (patchset #2 id:20001 of https://codereview.chromium.org/1941673002/ )
      
      Reason for revert:
      [Sheriff] Breaks mac gc stress:
      https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/5821
      
      Original issue's description:
      > [turbofan] Remove left-over change bits from ChangeLowering.
      >
      > Now ChangeLowering is only concerned with lowering memory access and
      > allocation operations, and all changes are consistently lowered during
      > the effect/control linearization pass. The next step is to move the
      > left over lowerings to a pass dedicated to eliminate redundant loads and
      > stores, eliminate write barriers, fold and inline allocations.
      >
      > Also remove the atomic regions now that we wire everything into the
      > effect chain properly. This is an important step towards allocation
      > inlining.
      >
      > Drive-by-fix: Rename ChangeBitToBool to ChangeBitToTagged,
      > ChangeBoolToBit to ChangeTaggedToBit, and ChangeInt31ToTagged to
      > ChangeInt31ToTaggedSigned for consistency.
      >
      > CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux64_tsan_rel
      >
      > Committed: https://crrev.com/ceca5ae308bddda166651c654f96d71d74f617d0
      > Cr-Commit-Position: refs/heads/master@{#35924}
      
      TBR=ishell@chromium.org,bmeurer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review-Url: https://codereview.chromium.org/1942733002
      Cr-Commit-Position: refs/heads/master@{#35927}
      b4c3864b
    • bmeurer's avatar
      [turbofan] Remove left-over change bits from ChangeLowering. · ceca5ae3
      bmeurer authored
      Now ChangeLowering is only concerned with lowering memory access and
      allocation operations, and all changes are consistently lowered during
      the effect/control linearization pass. The next step is to move the
      left over lowerings to a pass dedicated to eliminate redundant loads and
      stores, eliminate write barriers, fold and inline allocations.
      
      Also remove the atomic regions now that we wire everything into the
      effect chain properly. This is an important step towards allocation
      inlining.
      
      Drive-by-fix: Rename ChangeBitToBool to ChangeBitToTagged,
      ChangeBoolToBit to ChangeTaggedToBit, and ChangeInt31ToTagged to
      ChangeInt31ToTaggedSigned for consistency.
      
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux64_tsan_rel
      
      Review-Url: https://codereview.chromium.org/1941673002
      Cr-Commit-Position: refs/heads/master@{#35924}
      ceca5ae3
  18. 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
  19. 22 Apr, 2016 2 commits
    • bmeurer's avatar
      [turbofan] Move more type checks to the representation selector. · 550c0f9f
      bmeurer authored
      Get rid of further typing checks from ChangeLowering and put them into
      the representation selection pass instead (encoding the information in
      the operator instead).
      
      Drive-by-change: Rename ChangeSmiToInt32 to ChangeTaggedSignedToInt32
      for consistency about naming Tagged, TaggedSigned and TaggedPointer.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1909343002
      
      Cr-Commit-Position: refs/heads/master@{#35723}
      550c0f9f
    • bmeurer's avatar
      [turbofan] Optimize tagged conversion based on type. · 861295bf
      bmeurer authored
      If we have to convert a float64 value to tagged representation and we
      already know that the value is either in Signed31/Signed32 or
      Unsigned32 range, then we can just convert the float64 to word32 and
      use the fast word32 to tagged conversion. Doing this in
      ChangeLowering (or the effect linearization pass) would be unsound, as
      the types on the nodes are no longer usable.
      
      This removes all Type uses from effect linearization. There's still some
      work to be done for ChangeLowering tho.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1908093002
      
      Cr-Commit-Position: refs/heads/master@{#35713}
      861295bf
  20. 14 Apr, 2016 1 commit
  21. 30 Mar, 2016 1 commit
    • bmeurer's avatar
      [builtins] Make Math.ceil, Math.trunc and Math.round optimizable. · 8d20f2fe
      bmeurer authored
      Migrate Math.ceil, Math.round and Math.trunc to TurboFan code stubs,
      similar to what we did with Math.floor, and make these builtins properly
      optimizable in TurboFan via appropriate simplified operators NumberCeil,
      NumberRound and NumberTrunc, which are intended to be reusable for
      ToInteger and ToLength optimizations that will be done in a followup CL.
      
      Also allows us to kill the funky %RoundNumber runtime function, which
      was quite heavy.
      
      Improve test coverage for Math.ceil and Math.trunc a lot, especially
      making sure that we also properly trigger the TurboFan builtin reducer
      case.
      
      R=jarin@chromium.org
      BUG=v8:4059
      LOG=n
      
      Review URL: https://codereview.chromium.org/1841993002
      
      Cr-Commit-Position: refs/heads/master@{#35135}
      8d20f2fe
  22. 29 Mar, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce NumberFloor simplified operator. · 43216574
      bmeurer authored
      The NumberFloor operator matches exactly the semantics of the Math.floor
      builtin on Numbers. It uses hardware rounding instructions if available,
      but provides a full fallback solution that is compatible with Math.floor.
      The lowering is optimizable based on types if needed later, i.e. we
      already optimize it for the case that the input is already an Integer
      (in the EcmaScript sense, including NaN and -0), but we could add more
      optimizations, like combining NumberFloor and NumberDivide in the
      future, if necessary.
      
      R=jarin@chromium.org
      BUG=v8:2890,v8:4059
      LOG=n
      
      Review URL: https://codereview.chromium.org/1843533003
      
      Cr-Commit-Position: refs/heads/master@{#35090}
      43216574
  23. 17 Dec, 2015 1 commit
  24. 19 Oct, 2015 1 commit
  25. 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
  26. 01 Sep, 2015 1 commit
  27. 31 Aug, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Remove usage of Unique<T> from graph. · 6e65e6db
      mstarzinger authored
      The usage of Unique<T> throughout the TurboFan IR does not have any
      advantage. There is no single point in time when they are initialized
      and most use-sites looked through to the underlying Handle<T> anyways.
      Also there already was a mixture of Handle<T> versus Unique<T> in the
      graph and this unifies the situation to use Handle<T> everywhere.
      
      R=bmeurer@chromium.org,titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1314473007
      
      Cr-Commit-Position: refs/heads/master@{#30458}
      6e65e6db
  28. 25 Jun, 2015 1 commit
  29. 28 May, 2015 1 commit
  30. 09 Apr, 2015 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Add poor man's store elimination for storing to fields. · f190a6d2
      Benedikt Meurer authored
      This is a very simple dead store elimination that removes StoreField
      nodes which are immediately followed by other StoreField nodes that
      store to the same field. Ideally there should be a fully featured store
      elimination, which walks over the effect graph starting from the end,
      but there are some technical difficulties to solve before we can get to
      that, esp. we need to think about "effect producing" operators like
      ValueEffect first. Once we have that, it is trivial to remove this temporary
      poor man's store elimination.
      
      R=dcarney@chromium.org
      
      Review URL: https://codereview.chromium.org/1070003002
      
      Cr-Commit-Position: refs/heads/master@{#27697}
      f190a6d2
  31. 19 Mar, 2015 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Remove indirection in JSToBoolean/JSUnaryNot lowering. · a75e4cea
      Benedikt Meurer authored
      This reduces the overhead of typed lowering, because we lower
      JSToBoolean/JSUnaryNot directly if possible, instead of first lowering
      to AnyToBoolean, and then letting the SimplifiedOperatorReducer do the
      further lowering.
      
      Also remove some obsolete tests from the cctest suite that have since
      been removed by proper unittests. And improve unitttest coverage for the
      typed lowering cases.
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/999173003
      
      Cr-Commit-Position: refs/heads/master@{#27295}
      a75e4cea
  32. 29 Jan, 2015 1 commit
  33. 14 Jan, 2015 1 commit
  34. 08 Jan, 2015 1 commit
  35. 05 Jan, 2015 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Correctify JSToBoolean lowering. · 9def087e
      Benedikt Meurer authored
      Introduce a new AnyToBoolean simplified operator to handle the later
      lowering of boolean conversions. Previously we tried to hack that with
      the generic JSToBoolean, having its context set to zero, but that lead
      to various problems/bugs and did not handle all cases.
      
      TEST=cctest,unittests
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/800833003
      
      Cr-Commit-Position: refs/heads/master@{#25958}
      9def087e
  36. 02 Dec, 2014 1 commit