Skip to content

Commit

Permalink
deps: V8: cherry-pick cca9ae3c9a
Browse files Browse the repository at this point in the history
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 nodejs#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: nodejs#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: nodejs#27667
  • Loading branch information
bmeurer authored and bnoordhuis committed May 16, 2019
1 parent 9f99d4e commit 5176a79
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions deps/v8/src/compiler/property-access-builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ bool NeedsCheckHeapObject(Node* receiver) {
case IrOpcode::kJSToString:
case IrOpcode::kTypeOf:
return false;
case IrOpcode::kPhi: {
Node* control = NodeProperties::GetControlInput(receiver);
if (control->opcode() != IrOpcode::kMerge) return true;
for (int i = 0; i < receiver->InputCount() - 1; ++i) {
if (NeedsCheckHeapObject(receiver->InputAt(i))) return true;
}
return false;
}
default:
return true;
}
Expand Down

0 comments on commit 5176a79

Please sign in to comment.