Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: src/compiler/js-call-reducer.cc

Issue 2878343003: [turbofan] Ignore accumulator uses in frame state for the apply-argument optimization decision. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-call-reducer.cc
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc
index 3a88a90c978102d9f08434a7d317ed068601a4ea..5e4a8f47a9588ed9edb554e5b4d21517b558c8ad 100644
--- a/src/compiler/js-call-reducer.cc
+++ b/src/compiler/js-call-reducer.cc
@@ -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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698