Commit 168eb163 authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Ignore accumulator uses in frame state for the apply-argument optimization decision.

BUG=chromium:718820

Review-Url: https://codereview.chromium.org/2878343003
Cr-Commit-Position: refs/heads/master@{#45292}
parent 558cee1d
......@@ -124,7 +124,14 @@ Reduction JSCallReducer::ReduceFunctionPrototypeApply(Node* node) {
Node* arg_array = NodeProperties::GetValueInput(node, 3);
if (arg_array->opcode() != IrOpcode::kJSCreateArguments) return NoChange();
for (Edge edge : arg_array->use_edges()) {
if (edge.from()->opcode() == IrOpcode::kStateValues) continue;
Node* user = edge.from();
// Ignore uses as frame state's locals or parameters.
if (user->opcode() == IrOpcode::kStateValues) continue;
// Ignore uses as frame state's accumulator.
if (user->opcode() == IrOpcode::kFrameState &&
user->InputAt(2) == arg_array) {
continue;
}
if (!NodeProperties::IsValueEdge(edge)) continue;
if (edge.from() == node) continue;
return NoChange();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment