Skip to content

Commit 83f2430

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 <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]> Cr-Commit-Position: refs/heads/master@{#61503} Fixes: #27667 PR-URL: #27729 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c746156 commit 83f2430

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

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

-8
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,6 @@ bool NeedsCheckHeapObject(Node* receiver) {
115115
case IrOpcode::kJSToString:
116116
case IrOpcode::kTypeOf:
117117
return false;
118-
case IrOpcode::kPhi: {
119-
Node* control = NodeProperties::GetControlInput(receiver);
120-
if (control->opcode() != IrOpcode::kMerge) return true;
121-
for (int i = 0; i < receiver->InputCount() - 1; ++i) {
122-
if (NeedsCheckHeapObject(receiver->InputAt(i))) return true;
123-
}
124-
return false;
125-
}
126118
default:
127119
return true;
128120
}

0 commit comments

Comments
 (0)