Commit Graph

80021 Commits

Author SHA1 Message Date
Liu Yu
2949bb9e5c [loong64][mips64] Rename CodeDataContainer to Code
Port commit c53c026e6e

Bug: v8:13654
Change-Id: If925923040fca38f8e8a224efdcf050112559702
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173356
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#85529}
2023-01-29 03:41:47 +00:00
v8-ci-autoroll-builder
d55d51a242 Update V8 DEPS (trusted)
Rolling v8/build: 6971fa8..8aeec71

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2ba5bfe..cae097a

Rolling v8/third_party/depot_tools: 562481d..b7d8efd

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230126.1.1..version:11.20230127.1.1

Rolling v8/third_party/zlib: 44d9b49..2d44c51

Rolling v8/tools/clang: 1214b4d..c272f2c

Change-Id: I3ce7a03da15325f397552f0335a5e68acf5226b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200978
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85528}
2023-01-28 03:50:45 +00:00
Milad Fa
de36f16642 PPC/S390[baseline]: Separate signed and unsigned conditions
ppc/s390 use separate instructions for signed/unsigned comparisons
in order to set flags. We need to be able to differentiate between
these two types in order to emit the correct instruction.

Change-Id: Ia1b4508994c6e21a7d86ab070234eb37f76aca29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198317
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85527}
2023-01-27 22:02:49 +00:00
Deepti Gandluri
74085b2af4 [relaxed-simd][arm64] Optimize DotAdd instruction
- Add CPU detection for Dot product instructions
 - Use sdot for I32x4DotI8x16AddS operation

Bug: v8:13197
Change-Id: Ie3d52a7625246abaa371c2f4f4bdc8907d6889ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4190522
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85526}
2023-01-27 19:37:29 +00:00
Clemens Backes
76a817e03a [wasm][memory64] Fix atomics
This fixes a TODO about atomics and memory64 and removes the explicit
CHECK that checks for the unsupported situation.
Similar to other memory accesses, the memory index is supposed to be a
64-bit value if memory64 is being used.
The bounds checking implementation in Liftoff and TurboFan is shared
with non-atomic memory accesses, so this is already prepared for
memory64. We only need to fix the expected type in the function body
decoder, and prepare the assembler for 64-bit values.

R=jkummerow@chromium.org

Bug: v8:13636, v8:10949
Change-Id: I210ac488bd2bb1cb141e16597ca62d3fb27cad3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4191767
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85525}
2023-01-27 17:30:23 +00:00
Clemens Backes
b0d8319803 [wasm] Some minor performance improvements
This adds a few annotations and minor optimizations to improve
performance of decoding and Liftoff compilation.

R=dlehmann@chromium.org

Bug: v8:13565, v8:13673
Change-Id: Icf582d72c35db68228bcecea0a8c2ab3f8f0d340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198138
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85524}
2023-01-27 17:07:31 +00:00
Victor Gomes
ea6c05d2c3 [maglev] Pass field representation to LoadPolymorphicTaggedField
So we can statically find the returning type in case of a Smi.

Bug: v8:7700
Change-Id: I67f8d1c1c96fef8dc4e246953d9face2c04a9923
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198152
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85523}
2023-01-27 16:01:50 +00:00
Victor Gomes
721cd23b3d Reland "[maglev] Do not use LoadPolymorphicDoubleField if only Smis"
This is a reland of commit 193db1b453

Original change's description:
> [maglev] Do not use LoadPolymorphicDoubleField if only Smis
>
> Bug: v8:7700
> Change-Id: I25eceaa6a926c17bdba882145d073afbdf71e091
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198149
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85516}

Bug: v8:7700
Change-Id: If6c1ed90bb614c95d1718ef87fc6ea06c747706c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200117
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85522}
2023-01-27 14:46:09 +00:00
Liviu Rau
fec8c611c8 Configure PGO builders
- add new d8_pgo isolate to be used in profile tasks;
 - configure swarming task (test) for PGO instrumentation builder
 - create script for profile only execution (no build) to be used in swarming

Led tested #1 with spike recipe #2. Example swarming task #3.

#1 https://chromium-swarm.appspot.com/task?id=60089d22e809e410
#2 https://chromium-review.googlesource.com/c/chromium/tools/build/+/4162092/11
#3 https://chromium-swarm.appspot.com/task?id=60089fcbafb0a610

Bug: chromium:1382471
Change-Id: I782b7874c8dd77e821715395dd54dbc8990bf2c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173584
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#85521}
2023-01-27 13:54:32 +00:00
Victor Gomes
b9a0abd23e [maglev] Fix acquiring a double in a loop
Bug: v8:7700
Change-Id: I230f2dacf5a63e59a7644fb670540e28df200ed7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198151
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85520}
2023-01-27 13:45:25 +00:00
Nico Hartmann
a1ab842dbe [turboshaft] Port operations from ECL to MachineLoweringReducer (2)
This CL ports operations from Turbofan's EffectControlLinearizer to
Turboshaft's MachineLoweringReducer:
 - CheckedBigIntToBigInt64
 - ChangeUint64ToBigInt

Bug: v8:12783
Change-Id: I9386864305397642b840d2e89a6066a3263ce25d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198146
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85519}
2023-01-27 13:30:09 +00:00
Matthias Liedtke
3c077cfe85 Revert "[maglev] Do not use LoadPolymorphicDoubleField if only Smis"
This reverts commit 193db1b453.

Reason for revert: breaks UBSan for a Wasm test on i31refs (SMIs) being used on the Wasm/JS boundary for globals
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8790815961064270545/+/u/Check_-_extra/reference-globals-import

Original change's description:
> [maglev] Do not use LoadPolymorphicDoubleField if only Smis
>
> Bug: v8:7700
> Change-Id: I25eceaa6a926c17bdba882145d073afbdf71e091
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198149
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85516}

Bug: v8:7700
Change-Id: Id88fb455aef5d60fb10cfa579406637a0aa1b6d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200116
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85518}
2023-01-27 12:46:24 +00:00
Omer Katz
62bae08166 [heap] Contribute to promoted page iteration while waiting
Threads that are waiting for promoted page iteration to finish can
contribute by iterating themselves.
This should allow array buffer sweeping to start earlier.

Drive-by: encapsulate local pretenuring feedback and local old_to_new
remembered sets in a container for easier sharing and passing around.

Bug: v8:12612, chromium:1407652
Change-Id: I4bf9402191886413b7bd25e2e8c038fc9fc28437
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4184204
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85517}
2023-01-27 12:10:33 +00:00
Victor Gomes
193db1b453 [maglev] Do not use LoadPolymorphicDoubleField if only Smis
Bug: v8:7700
Change-Id: I25eceaa6a926c17bdba882145d073afbdf71e091
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198149
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85516}
2023-01-27 11:59:09 +00:00
Victor Gomes
021fe0c80f [maglev] Allocate HeapNumber in PolymorphicTagged with double repr
We should not re-use the HeapNumber from the loaded source object,
we must allocate a new one.

Bug: v8:7700
Change-Id: I6776356449623383a129d2bbe2b7f0ff9171748e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198148
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85515}
2023-01-27 11:46:18 +00:00
Camillo Bruni
59de53fbcf [ic] Remove overzealous DCHECK
Bug: chromium:1408086
Change-Id: I6df2b052a0d4703b335505d7e179c98cfbd0f5cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198140
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85514}
2023-01-27 10:22:13 +00:00
Dominik Inführ
2fea89c46c [heap] Fix --code-stats in debug builds
This CL fixes failing DCHECKs when Heap::CollectCodeStatistics() is
invoked in the atomic GC pause.

* Heap::CollectGarbage disallows GC, so move CollectCodeStatistics()
  into Heap::GarbageCollectionEpilogue() where such an exception
  already exists.
* CollectCodeStatistics() also needs to finish sweeping but a DCHECK
  in GCTracer only allowed this for heap verification.

Bug: v8:13267
Change-Id: I6c8e75ad5e78347fc162d3b67be10cb972269a12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197335
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85513}
2023-01-27 10:05:26 +00:00
Nikolaos Papaspyrou
02df9f3ef1 [heap][test] Reland: Fix weakrefs tests for conservative stack scanning
31 out of the 36 JS tests in test/mjsunit/harmony/weakrefs/ rely on
precise GC with the following general pattern: they allocate some
objects, clear all references to them, invoke a GC, then perform
some test that assumes that the GC has reclaimed the objects.
When conservative stack scanning is used, this may fail.

This CL fixes the tests, ensuring that a precise GC will be invoked
when necessary, without scanning the stack. To achieve this, the GC
has to be invoked in asynchronous execution mode, which ensures that
it will be invoked from the event loop without a stack. In some
cases, this change requires a non-trivial change in the tests.

In 5 tests, part of the test's objective was to verify that a weak
reference is not cleared before the end of the turn. In those, it
was not possible to invoke GC asynchronously, as this would
immediately start a new turn. These tests still use synchronous GC
and they have been modified, if necessary, to allow for CSS (i.e.,
to not test that all possible garbage is reclaimed after a
sequential GC). Because of CSS, these tests may not always test
everything that they were intended to.

Some tests are unsuitable for testing in "GC stress" mode, because
this interferes with the execution of FinalizationRegistry cleanup
tasks or with the clearing of WeakRefs, when asynchronous GC is used.

Tests with trivial fix:

- cleanup-from-different-realm
- cleanup
- cleanup-proxy-from-different-realm
- cleanupsome-2
- cleanupsome-after-unregister
- cleanupsome
- finalizationregistry-keeps-holdings-alive
- multiple-dirty-finalization-groups
- stress-finalizationregistry-dirty-enqueue
- undefined-holdings
- unregister-after-cleanup
- unregister-before-cleanup
- unregister-called-twice
- unregister-inside-cleanup2
- unregister-inside-cleanup3
- unregister-inside-cleanup
- unregister-many
- unregister-when-cleanup-already-scheduled
- weak-cell-basics

Tests with non-trivial fixes; same logic but very restructured:

- cleanup-is-not-a-microtask:
- cleanup-on-detached-realm
- finalizationregistry-scheduled-for-cleanup-multiple-times
- finalizationregistry-independent-lifetime
- finalizationregistry-independent-lifetime-multiple
- reentrant-gc-from-cleanup
- symbol-in-finalizationregistry
  (was 2nd part of former symbol-as-weakref-target-gc)
- weak-unregistertoken

Tests with non-trivial fixes; same logic, restructured, using
synchronous GC:

- finalizationregistry-and-weakref
- symbol-as-weakref-target-gc
  (was 1st part of former symbol-as-weakref-target-gc)
- two-weakrefs
- weakref-creation-keeps-alive
- weakref-deref-keeps-alive

This is a reland of commit 20a954f4bc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4191774
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85477}

Bug: v8:13257
Bug: v8:13662
Change-Id: I298ccbc932afc44d5c8c858620a180388a25f5d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197675
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85512}
2023-01-27 10:00:33 +00:00
Michael Achenbach
a9f3188c66 [bazel] Update prebuilt bazel
The bazel version 5.4.0 (LTS) changes the defaults how python
stub scripts are chosen, which fixes a problem using Python2 scripts
on systems with no Python2 available.

This was uploaded as follows:
cd tools/bazel
cp <path-to>/bazel-5.4.0-linux-x86_64 ./bazel
upload_to_google_storage.py -b chromium-v8-prebuilt-bazel/linux bazel

Using:
https://github.com/bazelbuild/bazel/releases/download/5.4.0/bazel-5.4.0-linux-x86_64

Bug: chromium:1410471
Change-Id: I8e15cf2b42f77133206d6f5b789dab1f7c336f3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198145
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85511}
2023-01-27 08:36:09 +00:00
Victor Gomes
d98c971b6e [maglev][cleanup] AssertCondition to use cross-platform conditions
Bug: v8:7700
Change-Id: I7ca0209ae08ed60beb07e98b4699e7b6bab62324
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198139
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85510}
2023-01-27 07:12:07 +00:00
v8-ci-autoroll-builder
6b9f51e37c Update V8 DEPS (trusted)
Rolling v8/build: 1015724..6971fa8

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6cfc140..2ba5bfe

Rolling v8/third_party/depot_tools: 44e9bee..562481d

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230125.2.1..version:11.20230126.1.1

Rolling v8/third_party/zlib: dca2b91..44d9b49

Rolling v8/tools/clang: 566877f..1214b4d

Change-Id: I8d3f4ead3aff2bb32641476bd01a97ec0e67524c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197939
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85509}
2023-01-27 03:42:47 +00:00
Anton Bikineev
02afcd6b05 cppgc: Introduce subtle::UncompressedMember
Some very hot getters in Blink can spend many cycles on decompression.
We're planning to optimize such paths by selectively using uncompressed
pointers.

Change-Id: I78af751c423c56010a794448450032c66f8fa244
Bug: chromium:1410145
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4191778
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85508}
2023-01-26 23:51:28 +00:00
Milad Fa
fa303fcd0b PPC[liftoff]: Implement simd load lane
Drive-by: Simd128 load and store ops are also grouped
within a macro.

Change-Id: I7bfefb858472a1dfa6ed7e0615114b57739b1a85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4193366
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85507}
2023-01-26 19:06:48 +00:00
Victor Gomes
9b305c3322 [maglev][cleanup] Use cross platform conditions
- Make some nodes cross platforms
- Drive by: reduce maglev-ir-x64 includes

Bug: v8:7700, v8:11461
Change-Id: I785d859a29646c62e0a8eb53cbfd59095bc7c481
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198136
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85506}
2023-01-26 16:44:20 +00:00
Victor Gomes
aeeab6305d [baseline][cleanup] Use cross platform condition
Bug: v8:11461
Change-Id: I34f377ade988f4ad36693fd65634ff509a043775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197345
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85505}
2023-01-26 16:06:26 +00:00
Nico Hartmann
f4900cf92b [turbofan] Add proper conversions in RedundancyElimination
Change-Id: Ia832abb79894dfde290a8127534b161d6fcc8178
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197350
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85504}
2023-01-26 15:55:21 +00:00
Toon Verwaest
919166e9ef [maglev] Correctly update the type in EnsureType
We accidentally merged the static_type of the node into the runtime
info, rather than the runtime type we wanted to use.

Bug: v8:7700
Change-Id: Ief2f4887178a1b1f506a6a8b8be4d010a26eb92f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197352
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85503}
2023-01-26 15:40:06 +00:00
Victor Gomes
180bb8ef0d [bazel] Force code-generator to use Python3
No-Try: True
Bug: chromium:1410471
Change-Id: Iab2cff633d611faa460b6b6640de36e45380a23a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197354
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85502}
2023-01-26 15:24:06 +00:00
Jakob Kummerow
9ec4e9095a [turbofan] Fix 32-to-64 bit spill slot moves
Other optimizations can create a situation where it is valid to treat a
stack slot as either 32-bit (which is what its value was created as) or
64-bit value (to which it was implicitly zero-extended). So when moving
such a value to a register, we cannot use a 32-bit move instruction just
because the source was annotated as such; we must also take the target
slot's representation into account.

Fixed: chromium:1407594
Bug: chromium:1356461
Change-Id: I00d850c11a020b055e90f6107b604cdd267d9b6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197349
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85501}
2023-01-26 14:58:21 +00:00
Seth Brenith
83e2bce929 Smaller MATCH_PREVIOUS_TRANSLATION instructions in TranslationArrays
In translation arrays, the most common opcode is
MATCH_PREVIOUS_TRANSLATION. It is usually represented as two bytes: one
byte for the opcode, and a second byte for how many instructions to
match. In rare cases, it could extend to a third byte or further due to
the variable-length encoding of the operand.

In this change, I propose a more compact encoding for
MATCH_PREVIOUS_TRANSLATION instructions. The encoding described above is
still valid, but the decoder will also look for another option: if the
opcode byte's value is greater than any real opcode, then the opcode is
implicitly MATCH_PREVIOUS_TRANSLATION and its operand is equal to the
opcode byte minus kNumTranslationOpcodes.

This change saves about 10% of the total TranslationArray size in an
Octane run (130 kB). I don't see any speed changes in encoding
(based on V8.TFCodeGeneration) or decoding (based on
js-perf-test/StackTrace).

I recognize that we're reaching the point where continuing to fiddle
with TranslationArray encoding yields diminishing returns, but the
complexity introduced by this change is well encapsulated (within two
functions in a single .cc file), so I think it's worth doing. I don't
plan any further changes.

Another option I considered for packing data into the opcode byte is
at https://crrev.com/c/4190521 . Its benefit is greater than this
change, but its complexity is too, especially in the decoder.

Bug: v8:11354
Change-Id: I02fd4dc5f631e54f7a7acc483fbe82ceb5a9ccf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4190523
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85500}
2023-01-26 14:45:04 +00:00
Nico Hartmann
7f756058ab [turboshaft] Fix incorrect jumps into loops in Turboshaft's DCE
Bug: v8:12783
Fixed: chromium:1407342, chromium:1407338
Change-Id: I5081e6f45af36729b8fc8c01e952932c39be9a2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197347
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85499}
2023-01-26 14:10:42 +00:00
Toon Verwaest
f2ceafb732 [maglev] Only create phis for contexts of resumable loops
We need them there due to how they are restored on resume, but don't need them at all for other loops.

Bug: v8:7700
Change-Id: I28a13ccf05d4fcd7bcf5fb8abef4dedd64f990f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197096
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85498}
2023-01-26 14:09:40 +00:00
Olivier Flückiger
c97e61eaa3 [static-roots] Fix gen-static-roots for some build configurations
Fixes running gen-static-roots for:

* debug builds: need to access the value unchecked when generating the
  table as the shared r/o root table is uninitialized.
* different architectures: to generate the static-roots.h file we must
  have the same predictable heap layout in mksnapshot as in the actual
  static roots enabled build.

Bug: v8:13466
Change-Id: I87e087987d735bf3368085db2e977542978a88e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194204
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85497}
2023-01-26 13:25:35 +00:00
Tobias Tebbi
5bff98a677 [turboshaft] simplify block inlining
This removes the `direct_input` option from `CloneAndInlineBlock`,
which is now unnecessary thanks to the fix in
https://chromium-review.googlesource.com/c/v8/v8/+/4191773

In addition, this simplifies the code of `CloneAndInlineBlock` by
reducing the usage of assembler-global variables and by moving the
phi logic into the same function.

The creation of variables is now controlled by `current_block_needs_variables_` alone. To set this remaining global flag in a scoped fashion, this also adds the helper class
`ScopedModification` (which is used to simplify `ReentrantScope` too).

Bug: v8:12783

Change-Id: I979b110ea10921477efc4bf2c38bd56b5c573442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194203
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85496}
2023-01-26 13:15:10 +00:00
Matthias Liedtke
a19a2ff2be [wasm-stringrefs] Add string.from_code_point
Bug: v8:12868
Change-Id: I73447d5e60912f03bda2442d41d402b02a40d028
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194206
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85495}
2023-01-26 12:56:14 +00:00
Toon Verwaest
6112703014 [maglev] Avoid superfluous gap-moves at loops headers
Maglev's regalloc currently fills up registers with values it has on any
side of a branch; pulling the value from the stack on the other side.
This causes values that are live at the end of loops to be unspilled
before loops if they weren't already in that register. This is never
useful.

Bug: v8:7700
Change-Id: I120f3b351ea9919e450f8528a118191692e8cffd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197337
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85494}
2023-01-26 12:55:10 +00:00
Victor Gomes
368216e3a3 [bazel] Enable Turbofan by default
No-Try: True
Change-Id: I4fb73a9dd2438d66a25e0664c009f767d68bd0f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197341
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85493}
2023-01-26 12:49:59 +00:00
Nico Hartmann
c87e1caf21 [turbofan] Disable AccessMode::kDefine for TypedArrays
Bug: chromium:1408400
Change-Id: Icde985d19c55e1e72011a5ca8dd36ccf283ecb74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194730
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85492}
2023-01-26 12:44:00 +00:00
Nico Hartmann
c334837594 [turboshaft] Build skeleton for EffectControlLinearizer port
Bug: v8:12783
Change-Id: Id20476383709db4fe2acc90e073bd3a8e21244c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194718
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85491}
2023-01-26 12:37:28 +00:00
Victor Gomes
949bd4467d [codegen] Unify cross-platform conditions
This is useful to have cross-platform conditional jumps.

LiftOff, Sparkplug and Maglev all contain their cross-platform
condition that we cast/convert back-and-forth to the architecture one.

This unifies names (as alias) and avoids the back-and-forth.
The CL only adds the conditions, it does not use them yet.

Bug: v8:11461
Change-Id: I79a71bd7fa9d11903c9722fccde239eb3da8dba9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194731
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85490}
2023-01-26 12:34:15 +00:00
V8 Autoroll
d60b62b0af Version 11.2.0
Change-Id: I6955fe190f0abf431d55ab13283df95e60b867cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4196119
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85489}
2023-01-26 12:22:26 +00:00
Dominik Inführ
a4a37c9303 [heap] Remove flag --shared-string-table-using-shared-space
Since --shared-space is now enabled by default, we don't need this
flag for testing anymore.

Bug: v8:13267
Change-Id: Ib4c1111a75dbf93d05ccf3bac752c0ef089e3c15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194715
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85488}
2023-01-26 12:20:21 +00:00
Joyee Cheung
17339eff04 [ic] store the slow handler for proxy elements in DefineKeyedOwnIC
Previously we stored kProxy in this case, which resulted in
set semantics for proxies.

Bug: chromium:1409294
Change-Id: I6cca772eb6e6a35944375a72d10fc279263d2094
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188383
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#85487}
2023-01-26 12:19:18 +00:00
Nico Hartmann
7fbba7e1f8 [turbofan] Fix DCHECK in CommonOperatorReducer::DecideCondition
Bug: chromium:1408606
Change-Id: Ic2f41bd4b41c662ec2b075c3abe1b7a2d909e60a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194727
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85486}
2023-01-26 12:18:15 +00:00
Victor Gomes
cca14c7834 [maglev] Support polymorphic loads of doubles
Drive-by:
- Make LoadDoubleField arch-indepedent
- Fix map check in LoadPolymorphicTaggedField

Bug: v8:7700
Change-Id: I138056c31ac9004971420f58db7df7e535d603e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194717
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85485}
2023-01-26 12:17:05 +00:00
Matthias Liedtke
a0417c29d8 Use explicit values for ComparisonResult
Change-Id: I2e0d1896b5fae166bb8563d1fcb1cea620e20f0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194716
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85484}
2023-01-26 12:16:02 +00:00
Matthias Liedtke
29d42d0628 [gn] Provide explicit name in component builds
With https://crrev.com/c/4166369 the default names changed from
e.g. libv8.so to lib_v8.so.
This causes at least some issues on build bots but might also
impact other projects assuming certain names in case of component
builds.
The default naming can be prevented by providing an explicit
{output_name} on each component.

No-Tree-Checks: true
Change-Id: I501c3f6c530e6d3896e2303ee75a0c4a4d07dfca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194732
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85483}
2023-01-26 12:05:07 +00:00
Manos Koukoutos
ca27aeeff1 [wasm-gc] Make extern.* instructions constant
Bug: v8:7748
Change-Id: Iabd6419055a7ec4824e58edfc38ac1d30b7f7be1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194193
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85482}
2023-01-26 09:10:44 +00:00
Matthias Liedtke
22bef706e1 [wasm] Remove redundant subclass from ModuleDecoder
Bug: v8:7748
Change-Id: I45726b178760c63ef77fa9d1c9cffce35cc6b8d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4194719
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85481}
2023-01-26 09:09:40 +00:00
v8-ci-autoroll-builder
8c8dfc75bb Update V8 DEPS (trusted)
Rolling v8/build: 3ed59a9..1015724

Rolling v8/buildtools: 0cc02fb..3c7e3f1

Rolling v8/buildtools/third_party/libc++/trunk: 1dfd002..1127c78

Rolling v8/buildtools/third_party/libunwind/trunk: bb5988e..e95b94b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/45986b0..6cfc140

Rolling v8/third_party/depot_tools: 00be3f0..44e9bee

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230124.2.1..version:11.20230125.2.1

Rolling v8/tools/clang: 41fd15a..566877f

Rolling v8/tools/luci-go: git_revision:81e5cdad29bb4c7aaad98c843637513db3155b0d..git_revision:221383f749a2c5b8587449d3d2e4982857daa9e7

Rolling v8/tools/luci-go: git_revision:81e5cdad29bb4c7aaad98c843637513db3155b0d..git_revision:221383f749a2c5b8587449d3d2e4982857daa9e7

Change-Id: If5bd9268220db8d5f49b57cd641a21c2bf2fe398
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4196414
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85480}
2023-01-26 04:08:49 +00:00