1. 22 Mar, 2022 1 commit
    • Darius M's avatar
      Reland^2 [compiler] Simplify "==0" branches in MachineOperatorReducer · 0719ace6
      Darius M authored
      This is a reland of 6b690a6b.
      
      The previous version of this CL was a bit too aggressive in the
      duplication of branch conditions. This caused an increase in
      register pressure in some cases, thus reducing performance.
      
      In fact, duplicating branch conditions that require an "== 0" to be
      added provides no benefits. We are thus now a bit less aggressive, and
      only duplicate comparisons.
      
      Original change's description:
      > Reland [compiler] Simplify "==0" branches in MachineOperatorReducer
      >
      > This is a reland of 48b443f6.
      >
      > While fixing the initial CL, we stumbled upon a few bugs that
      > we had to fix:
      >
      >  - CommonOperatorReducer and SimplifiedOperatorReducer were applied
      >    before and after SimplifiedLowering, but always assumed that it
      >    was before SimplifiedLowering, and thus had the wrong semantics
      >    for branches in some cases. They now have an added parameter to
      >    know which semantics of branch they should use.
      >
      >  - The lowering of StaticAssert was wrong and could leave kHeapConstant
      >    in the assert (instead of machine Booleans).
      >
      > Original change's description:
      > > [compiler] Simplify "==0" branches in MachineOperatorReducer
      > >
      > > Bug: v8:12484
      > > Change-Id: I0667c7464c0dd71338bc199a24a69248a7a0a525
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497303
      > > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > > Owners-Override: Tobias Tebbi <tebbi@chromium.org>
      > > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      > > Cr-Commit-Position: refs/heads/main@{#79379}
      >
      > Bug: v8:12484
      > Change-Id: Ibbf5df96fce5ccb04868dc517539479bf69f5703
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516869
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79528}
      
      Bug: v8:12484
      Change-Id: I31f575a59811a83c7c1acb4c14bf5ded63a8f536
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3540102Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79560}
      0719ace6
  2. 21 Mar, 2022 1 commit
    • Darius Mercadier's avatar
      Revert "Reland [compiler] Simplify "==0" branches in MachineOperatorReducer" · b3a91634
      Darius Mercadier authored
      This reverts commit 6b690a6b.
      
      Reason for revert: causes a few regressions here https://chromeperf.appspot.com/group_report?rev=79528
      
      Original change's description:
      > Reland [compiler] Simplify "==0" branches in MachineOperatorReducer
      >
      > This is a reland of 48b443f6.
      >
      > While fixing the initial CL, we stumbled upon a few bugs that
      > we had to fix:
      >
      >  - CommonOperatorReducer and SimplifiedOperatorReducer were applied
      >    before and after SimplifiedLowering, but always assumed that it
      >    was before SimplifiedLowering, and thus had the wrong semantics
      >    for branches in some cases. They now have an added parameter to
      >    know which semantics of branch they should use.
      >
      >  - The lowering of StaticAssert was wrong and could leave kHeapConstant
      >    in the assert (instead of machine Booleans).
      >
      > Original change's description:
      > > [compiler] Simplify "==0" branches in MachineOperatorReducer
      > >
      > > Bug: v8:12484
      > > Change-Id: I0667c7464c0dd71338bc199a24a69248a7a0a525
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497303
      > > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > > Owners-Override: Tobias Tebbi <tebbi@chromium.org>
      > > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      > > Cr-Commit-Position: refs/heads/main@{#79379}
      >
      > Bug: v8:12484
      > Change-Id: Ibbf5df96fce5ccb04868dc517539479bf69f5703
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516869
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79528}
      
      Bug: v8:12484
      Change-Id: I457464d793e9c5af8448564aa3b46be863b96fbb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3540148
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79552}
      b3a91634
  3. 18 Mar, 2022 1 commit
    • Darius M's avatar
      Reland [compiler] Simplify "==0" branches in MachineOperatorReducer · 6b690a6b
      Darius M authored
      This is a reland of 48b443f6.
      
      While fixing the initial CL, we stumbled upon a few bugs that
      we had to fix:
      
       - CommonOperatorReducer and SimplifiedOperatorReducer were applied
         before and after SimplifiedLowering, but always assumed that it
         was before SimplifiedLowering, and thus had the wrong semantics
         for branches in some cases. They now have an added parameter to
         know which semantics of branch they should use.
      
       - The lowering of StaticAssert was wrong and could leave kHeapConstant
         in the assert (instead of machine Booleans).
      
      Original change's description:
      > [compiler] Simplify "==0" branches in MachineOperatorReducer
      >
      > Bug: v8:12484
      > Change-Id: I0667c7464c0dd71338bc199a24a69248a7a0a525
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497303
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Owners-Override: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79379}
      
      Bug: v8:12484
      Change-Id: Ibbf5df96fce5ccb04868dc517539479bf69f5703
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516869Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79528}
      6b690a6b
  4. 10 Dec, 2021 1 commit
  5. 25 Jun, 2021 1 commit
  6. 26 Apr, 2021 2 commits
    • Jakob Gruber's avatar
      [compiler] Remove --turbo-direct-heap-access · 4f2f14f8
      Jakob Gruber authored
      On a per-job basis, --turbo-direct-heap-access should be equal to
      whether concurrent inlining is enabled. We simplify involved logic by
      removing the flag, and replacing all access to
      
      - FLAG_turbo_direct_heap_access, and
      - FLAG_concurrent_inlining
      
      inside compiler/ with
      OptimizedCompilationInfo::is_concurrent_inlining() (or derived values).
      
      Bug: v8:7790
      Change-Id: I64818e0e1004dded08c784ef1c4bdfd2af990a59
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843345
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74166}
      4f2f14f8
    • Jakob Gruber's avatar
      [compiler] Refactor HeapObjectRef::BooleanValue paths · 0bc71bc9
      Jakob Gruber authored
      .. which used to be implemented by calling BooleanValue eagerly on all
      seen heap objects during serialization. 1) it's wasteful to call this
      on every object, 2) this was blocking conversion of HeapObjectRefs to
      not require main-thread serialization.
      
      This CL replaces the old pattern by a thread-safe TryGetBooleanValue
      method, which may fail in some cases (e.g. when trying to read into a
      HeapNumber).
      
      Bug: v8:7790
      Change-Id: I9d4ab7725231adce0b488c4c08c1f4bac78ce3c5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2839557
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74165}
      0bc71bc9
  7. 03 Dec, 2020 1 commit
    • Leszek Swirski's avatar
      [compiler] Remove disallow scopes · a6f465d4
      Leszek Swirski authored
      TurboFan creates DisallowHeapAccess scopes, to prevent heap access in
      the concurrent parts of the compiler. Then, for parts of the compiler
      that do want to access the heap, it either creates Allow* scopes (which
      should be avoided since they "punch a hole" in the Disallow* scopes), or
      relies on a weakening of Handle::IsDereferenceAllowed which allows
      handles owned by a LocalHeap to be dereferenced even if there is a
      DisallowHeapDereference scope.
      
      This patch:
      
        a) Strengthens the implicit requirements around handle dereferencing
           to require a running heap on this thread (either main-thread heap
           or an un-parked, un-safepointed LocalHeap).
        b) Removes the overly strict Disallow scopes in TurboFan, relying
           instead on implicit requirements for allocation/handle
           dereferencing in off-thread code.
        c) Cleans up the "should_disallow_heap_access" predicate to be more
           explicit about what should be disallowed (e.g. property accesses
           can't be computed concurrently)
      
      Change-Id: Icb56b7764913ac17e2db197a70bb189af88a6978
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554617
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71600}
      a6f465d4
  8. 09 Nov, 2020 1 commit
    • Georg Neis's avatar
      [compiler] Fix use of HeapObjectMatcher · 27900f17
      Georg Neis authored
      In a few places we incorrectly assumed to know the instance type of the
      heap object. In particular, in JSCallReducer::ReduceDataViewAccess,
      doing map inference on the receiver and determining that all maps are
      JSDataView maps does not guarantee that the receiver is a JSDataView
      constant because we might deopt before getting to the data view
      operation.
      
      Bug: chromium:1146652
      Change-Id: I1611308c3ebe0d33fa6b0cf0938d777b4e6449ff
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2524440
      Auto-Submit: Georg Neis <neis@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71034}
      27900f17
  9. 28 Oct, 2020 1 commit
  10. 14 Oct, 2020 1 commit
  11. 22 Sep, 2020 1 commit
  12. 11 Nov, 2019 1 commit
  13. 16 Oct, 2019 1 commit
  14. 09 Oct, 2019 1 commit
  15. 24 Aug, 2019 1 commit
    • Joey Gouly's avatar
      [ptr-compr][turbofan] Add some simplified reducers for compressions · e68a51f7
      Joey Gouly authored
      ChangeTaggedSignedToInt32(ChangeCompressedSignedToTaggedSigned((x)) ->
        ChangeCompressedSignedToInt32(x)
      
      This pattern shows up in the Octane Richards benchmark (on arm64):
      
          sxtw x11, w10
          asr w11, w11, #1
      
      This patch will remove the sxtw.
      
      ChangeCompressedSignedToInt32(CheckedInt32ToCompressedSigned(x)) -> x
      
      This pattern shows up in the Octane Richards benchmark (on arm64):
      
          adds w10, w10, w10
          b.vs #+0x1118
          asr w11, w10, #1
          stur w10, [x6, #19]
          cmp w11, #0x1a
      
      This patch will remove the asr, and produce:
      
          adds w11, w10, w10
          b.vs #+0x1108
          stur w11, [x6, #19]
          cmp w10, #0x1a
      
      Bug: v8:7703
      Change-Id: I5843e0a4f723b202857ee86130f835cd048d7e31
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1763529Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
      Commit-Queue: Rodolph Perfetta <rodolph.perfetta@arm.com>
      Cr-Commit-Position: refs/heads/master@{#63389}
      e68a51f7
  16. 26 Jul, 2019 1 commit
  17. 25 Jul, 2019 1 commit
    • Santiago Aboy Solanes's avatar
      [ptr-compr] Avoid (de)compressions in CheckSmi · 31518ccc
      Santiago Aboy Solanes authored
      Avoids unnecessary compression and decompression nodes since we
      are going to be able to check for smis without needing to decompress and
      re-compress.
      
      It was doing a CheckedInt32ToTaggedSigned ->
      ChangeTaggedSignedToCompressedSigned combo, where we could just do
      CheckedInt32ToCompressedSigned.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
      Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
      Bug: v8:7703
      Change-Id: I0bbbbb5bd4744c49840c84b2fcb775fe6b603de0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714878
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62917}
      31518ccc
  18. 15 May, 2019 1 commit
  19. 18 Oct, 2018 1 commit
  20. 15 Oct, 2018 1 commit
  21. 17 Sep, 2018 1 commit
  22. 23 Jul, 2018 1 commit
  23. 17 Jul, 2018 1 commit
  24. 10 Jul, 2018 2 commits
  25. 25 May, 2018 1 commit
  26. 04 Jan, 2017 1 commit
  27. 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
  28. 17 Oct, 2016 1 commit
  29. 07 Oct, 2016 1 commit
  30. 29 Sep, 2016 1 commit
  31. 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
  32. 13 Sep, 2016 1 commit
  33. 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
  34. 11 Aug, 2016 1 commit
  35. 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
  36. 29 Jun, 2016 2 commits
  37. 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