[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}
This commit is contained in:
jarin 2017-05-15 01:35:40 -07:00 committed by Commit bot
parent 558cee1d14
commit 168eb163a7

View File

@ -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();