Skip to content

Commit 8b8fe87

Browse files
bmeurertargos
authored andcommitted
deps: V8: cherry-pick cca9ae3c9a
Original commit message: Remove recursion from NeedsCheckHeapObject. We use the predicate NeedsCheckHeapObject in the compiler frontend to determine whether we can skip introducing CheckHeapObject nodes. But this predicate would also walk up the graph in case of Phis, which can result in really long compilation times (on the main thread). In the report in #27667, the compiler frontend alone took around 4-5mins of main thread time for a single function. With this patch the time goes down to 4-5ms. Bug: v8:9250 Refs: #27667 Change-Id: I231eb780ff04f949fa1669714f9af6ebfbcade05 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612897 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#61503} Fixes: #27667 Backport-PR-URL: #28005 PR-URL: #27729 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 55e9944 commit 8b8fe87

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.4',
41+
'v8_embedder_string': '-node.5',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/compiler/property-access-builder.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,6 @@ bool NeedsCheckHeapObject(Node* receiver) {
119119
case IrOpcode::kJSToString:
120120
case IrOpcode::kTypeOf:
121121
return false;
122-
case IrOpcode::kPhi: {
123-
Node* control = NodeProperties::GetControlInput(receiver);
124-
if (control->opcode() != IrOpcode::kMerge) return true;
125-
for (int i = 0; i < receiver->InputCount() - 1; ++i) {
126-
if (NeedsCheckHeapObject(receiver->InputAt(i))) return true;
127-
}
128-
return false;
129-
}
130122
default:
131123
return true;
132124
}

0 commit comments

Comments
 (0)