Currently, decompression elimination may reduce phis by pushing decompressions in the value inputs of the phi "down" and replacing it by a single decompression following the phi node. Because of the way that the replacement is currently done, other reducers in the same phase will not generally get a chance to revisit the modified phi.
In the specific case of v8:9335 this blocked an additional optimization in CommonOperatorReducer from being applied, causing the overall load elimination test to fail.
This CL fixes the replacement behavior in decompression elimination to also allow for revisitations of the modified phi node.
Bug: v8:9335 v8:9336
Change-Id: I3ca5686dacb41a525160b08456905ba77cf28b39
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
Change-Id: I3ca5686dacb41a525160b08456905ba77cf28b39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648238
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Schmid <gsps@google.com>
Cr-Commit-Position: refs/heads/master@{#62054}
I realized that the parameter order of ValuesTypes::IsSubType is
inconsistent with the parameter of e.g. DCHECK_LT. DCHECK_LT(a, b) is
satisfied if a < b. For ValueTypes it was the other way around.
ValueTypes::IsSubType(a, b) returned true if b was a subtype of a.
R=mstarzinger@chromium.org
Bug: v8:9183
Change-Id: Ifb192bbecdcfe002ef8ca0887d1497393e16e11e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649358
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62050}
Implements the addition of BigInts as a Torque builtin, which performs necessary
checks and then calls into C++. The core logic of MutableBigInt::AbsoluteAdd,
MutableBigInt::AbsoluteSub and MutableBigInt::AbsoluteCompare is now used by both
the runtime and the Torque generated builtin for best performance.
Bug: v8:9213
Change-Id: I5f6af4dd226f11e6287bd04272ccae6ee5c26498
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1640211
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Cr-Commit-Position: refs/heads/master@{#62049}
Breakpad used to put a custom identifier 0x8003 into minidumps to
indicate arm64 architecture. Crashpad now uses the new standardized
value 12. This CL updates grokdump.py to understand both.
Change-Id: Ie9bf5106beba8059e89a48d42d32ac8069493925
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648258
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62047}
This way we walk the input string twice, but we reduce the number of branches
per ascii char in the long-ascii-sequence case from 2 per char to ~ 1 + 2 /
sizeof(intptr). Let's land and see what the bots say.
Change-Id: I574971c7df896237f3382be634a9bedc920fc827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649356
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62046}
Registering shared wasm memory with the memory tracker was implemented to
track which instances need to be upated across threads on grow. As the
growing of memory when it is shared is behind a flag, the registering
should also be gated by the flag so as to not create global handles
that keep the memory alive.
Bug: v8:9075
Change-Id: I379a19413befa281cd384c9167fbc22ba52f4c2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646882
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62043}
Adding and improving tests should have as little friction
as possible.
Change-Id: I61c09ccadf12b7367979fbf3b8cb97a64e0c70bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648243
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62038}
As per the new specs, when the exception is thrown by iterator's return method
while doing iterator close because it is not callable, the exception is
suppressed in the same way as if the return method is called and threw an exception.
https://github.com/tc39/ecma262/issues/1398
Bug: v8:9056
Change-Id: I21abd5fdd01d3a957c3c16d9d3aaab9091e43142
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648256
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Swapnil Gaikwad <swapnilgaikwad@google.com>
Cr-Commit-Position: refs/heads/master@{#62035}
This reverts commit 566233ae52.
Reason for revert: Breaks the build
Original change's description:
> Extend IsExtensible proxy trap fast path for Reflect.isExtensible
>
> The fast path for IsExtensible proxy trap is already implemented, we just need to use this for ReflectIsExtensible.
> Now, ReflectIsExtensible is now a Torque builtin (previously CPP). Other cases will fall back to runtime.
>
> Bug: v8:6664
> Change-Id: Ib1c3f78d1f1a44c6628d351fed3bcdc91ca08cb5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645438
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#62031}
TBR=jgruber@chromium.org,mslekova@chromium.org,tmrts@chromium.org,duongn@microsoft.com
Change-Id: I92f83d8c9cbdca1a33ddd0e875551deb62d7de89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6664
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648241
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62033}
Port 4237fc378c
Port 71c66873d6
Original Commit Message:
We want to allocate feedback vectors lazily in lite mode. To do that,
we should create closures with the correct feedback cell. This cl
allocates feedback cell arrays to hold these feedback cells in lite mode.
This cl also modifies the compile lazy to builtin to expect these arrays
in the feedback cell.
Drive-by fix: InterpreterEntryTrampoline no longer has argument count in
a register. So updated comments and removed unnecessary push/pop of this
register.
R=mythria@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: I2cca35cab2c0a1bc75619ff1565e453635f6b0e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646891
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62032}
The fast path for IsExtensible proxy trap is already implemented, we just need to use this for ReflectIsExtensible.
Now, ReflectIsExtensible is now a Torque builtin (previously CPP). Other cases will fall back to runtime.
Bug: v8:6664
Change-Id: Ib1c3f78d1f1a44c6628d351fed3bcdc91ca08cb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645438
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#62031}
If the embedder specifies an initial heap size, then we can take it
as a hint to skip full GCs below that threshold.
Bug: v8:9306
Change-Id: I42a4c597bf75c6ba9845ed7a6bd9946012979005
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646515
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62030}
This CL adds lint errors when 'let' bindings, arguments and labels
are not used. Note that errors for 'const' bindings will be added
later.
In cases where arguments are actually needed to match the signature,
the warning can be silenced by prefixing identifiers with "_". This
might be needed for generic specializations or builtins called from
TurboFan. Trying to use a variable or label that was marked with
"_" results in a compilation error.
Implicit arguments are not linted. They are implemented using exact
string matching. Prefixing an implicit argument with "_" in a callee
would break all callers as the names would no longer match.
Drive-by: Fix all new lint errors in the existing Torque code.
Bug: v8:7793
Change-Id: I68b3c59c76b956e9f88709e9388a40a19546ce52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645092
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62027}
The implementation is already quite trivial and in addition in case of
ptr-compr this implementation becomes even simpler and C++ compiler
gets the opportunity to hoist common computation of isolate root.
Tbr: yangguo@chromium.org
Bug: v8:7464, v8:7703
Change-Id: I6e59cd43253c9ade5a0e27025ea7fabecd5b7af7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647171
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62024}
Move the closure hints out of environment_hints_ so that they are
handled similar to return value hints. That makes things a little
cleaner overall.
Also make it clear in terms of SLOW_DCHECKs why we don't need to
merge closure hints and, in the case of a dead environment, return
value hints.
Also rename environment_hints_ to ephemeral_hints_. The old name was
weird because these are not the only hints in the environment.
Bug: v8:7790
Change-Id: I2cb5389632c4827b027799985b8320f39e1e2314
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643555
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62019}
The new API function is called ConfigureDefaultsFromHeapSize and
accepts two parameters: the initial and the maximum heap size.
Based on the given limits the function computes the default size
for the young and the old generation.
The patch also cleans up the existing functions to make them
consistent in terms of units and heap structure.
Bug: v8:9306
Change-Id: If2200a9cdb45b0b818a373207efe4e6426f7b688
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631593
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62017}
This is a reland of 81abe8f7b6
It also disables ro-heap sharing in nosnap builds
Original change's description:
> [roheap] Enable shared ro-heap by default if ptr compression is disabled
>
> Shared read-only heap is currently incompatible with pointer compression.
> Enable sharing only if pointer compression is disabled.
>
> Bug: v8:7464
> Change-Id: I0866ac288a34eb92fc227e8beba57f4d72a69ef0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1635509
> Reviewed-by: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
> Cr-Commit-Position: refs/heads/master@{#61963}
Bug: v8:7464
Change-Id: I6b620152d380864db2a725c25f3c916d695d4f81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1639298
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62015}
Ideally, in the common case the backtracking stack should be
stack-allocated (and thus cheap). We should only switch to dynamic
allocation if needed. SmallVector implements exactly this strategy, so
switch to that as a backing store.
This improves Octane/RegExp scores (--regexp-interpret-all) by 50%.
Bug: v8:7777,v8:9330
Change-Id: I0d1b07bd8fd94483128e021390d054f483076f8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645318
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62013}
This section potentially contains allocations and thus gc, all object
references should be handlified.
Bug: v8:9333
Change-Id: I5814e66e8b9b75a8bd952afecae7a3a27b42a642
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647695
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62012}
We need to hold onto the bytecode array so it doesn't get flushed.
Bug: v8:8394
Change-Id: Ia583a0a662740e369fcbc1c94041895e463be26e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645329
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62011}
This CL adds the last fields needed to stringify all stack frames from
StackFrameInfo objects instead of accessing the FrameArray directly.
Drive-by-change: The factory method that creates StackFrameInfo is
refactored to:
1. collect all values for the fields
2. allocate a StackFrameInfo
3. set all the values on the allocated info object.
This fixes undefined evaluation order bugs that GCMole failed to spot,
as well as make one factory method unnecessary.
Note: More precise types on the fields that are currently "Object"
will happen in a follow up CL.
Bug: v8:8742
Change-Id: Ia8c55fc128434f27aadeba78e8483d90296abe3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1641242
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62010}
This reverts commit ce23fd6400.
Original change's description:
> [heap] Clean up Heap::ConfigureHeap
>
> This re-arranges the implementation of the function to make it more
> consistent. The only functional change is replacement of RoundUp with
> RoundDown, which makes more sense for the limits.
>
> Bug: v8:9306
> Change-Id: Id1d4bc6cc414e3618c3878de8cb87a9ed59711f5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643432
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61997}
TBR=mlippautz@chromium.org,jgruber@chromium.org
Change-Id: I2352c1305ea3e617b32951e4b1aa871271800478
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645330
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62008}
This is a reland of a04862021e.
It turns out that this gives ~2x speedup on highly parallel WebAssembly
compilation, so let's try again landing this in isolation.
Original change's description:
> [zone] Use 32kb instead of 1MB as high zone page size
>
> It seems that allocating smaller pages is actually quite a bit faster than
> larger pages, probably because they can be cached by malloc. Let's see what the
> bots say.
>
> In a follow-up I'll check whether the segment-pool is actually beneficial or
> whether we should just remove it.
>
> This also drops SegmentSize::kLarge as a way to make compilation deterministic.
> Turns out that by now we need >8mb anyway, and the previous 1mb wasn't enough.
> At the same time the compiler was fixed to not rely on virtual addresses of
> zone objects anymore, and there's a bot checking whether the snapshot is
> determistic.
>
> Change-Id: I38cbb0d209d68b3671fd38763b42714811f4223e
> Reviewed-on: https://chromium-review.googlesource.com/c/1346370
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57683}
Change-Id: I243ba741f0968879b4cfe9f366d81ddc53a9bf27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645326
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62007}
ObjectIsExtensible is now a Torque builtin (previously CPP) and the Proxy path is implemented completely in Torque while everything else calls into runtime (and is thus a bit slower than previously).
Improvement in micro-benchmark
Before:
IsExtensibleWithoutTrap-Proxies(Score): 2228
IsExtensibleWithTrap-Proxies(Score): 917
After:
IsExtensibleWithoutTrap-Proxies(Score): 3683
IsExtensibleWithTrap-Proxies(Score): 3310
Bug: v8:6664
Change-Id: I1fbe1c51cb724a23d7a59fc8231bb3d1461a6add
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1637444
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62006}
This is a reland of 42fee61a97
The in-object fields of JSModuleNamespace has been excluded from torque.
It is restored back to its existing mechanism on the C++ side and rest
of the class is ported to torque.
Original change's description:
> [torque] Convert few class layout to torque.
>
> 1. Converted Module, JSModuleNameSpace, JSCollator, JSV8BreakIterator,
> TemplateList,
> JSStrictArgumentsObject to torque.
>
> Bug: v8:8952
> Change-Id: I01e88ac36acd7ba18791bec609e5ae737672c731
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619146
> Commit-Queue: Suraj Sharma <surshar@microsoft.com>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61671}
Bug: v8:8952
Change-Id: Ibd41000ad96ae57bd4f452f0c0c1b890e2c6fb5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1632833
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Suraj Sharma <surshar@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#62005}