Index: src/compiler/escape-analysis-reducer.cc |
diff --git a/src/compiler/escape-analysis-reducer.cc b/src/compiler/escape-analysis-reducer.cc |
index 2e2f6781ebfe3f8b8e6f7ea17c273779cd83e4aa..f833ebdf73060aaa86824a0e6a7444bb6fce77e3 100644 |
--- a/src/compiler/escape-analysis-reducer.cc |
+++ b/src/compiler/escape-analysis-reducer.cc |
@@ -23,9 +23,11 @@ EscapeAnalysisReducer::EscapeAnalysisReducer(Editor* editor, JSGraph* jsgraph, |
Reduction EscapeAnalysisReducer::Reduce(Node* node) { |
switch (node->opcode()) { |
case IrOpcode::kLoadField: |
- return ReduceLoadField(node); |
+ case IrOpcode::kLoadElement: |
+ return ReduceLoad(node); |
case IrOpcode::kStoreField: |
- return ReduceStoreField(node); |
+ case IrOpcode::kStoreElement: |
+ return ReduceStore(node); |
case IrOpcode::kAllocate: |
return ReduceAllocate(node); |
case IrOpcode::kFinishRegion: |
@@ -42,11 +44,13 @@ Reduction EscapeAnalysisReducer::Reduce(Node* node) { |
} |
-Reduction EscapeAnalysisReducer::ReduceLoadField(Node* node) { |
- DCHECK_EQ(node->opcode(), IrOpcode::kLoadField); |
+Reduction EscapeAnalysisReducer::ReduceLoad(Node* node) { |
+ DCHECK(node->opcode() == IrOpcode::kLoadField || |
+ node->opcode() == IrOpcode::kLoadElement); |
if (Node* rep = escape_analysis()->GetReplacement(node, node->id())) { |
if (FLAG_trace_turbo_escape) { |
- PrintF("Replaced #%d with #%d\n", node->id(), rep->id()); |
+ PrintF("Replaced #%d (%s) with #%d (%s)\n", node->id(), |
+ node->op()->mnemonic(), rep->id(), rep->op()->mnemonic()); |
} |
ReplaceWithValue(node, rep); |
return Changed(rep); |
@@ -55,11 +59,13 @@ Reduction EscapeAnalysisReducer::ReduceLoadField(Node* node) { |
} |
-Reduction EscapeAnalysisReducer::ReduceStoreField(Node* node) { |
- DCHECK_EQ(node->opcode(), IrOpcode::kStoreField); |
+Reduction EscapeAnalysisReducer::ReduceStore(Node* node) { |
+ DCHECK(node->opcode() == IrOpcode::kStoreField || |
+ node->opcode() == IrOpcode::kStoreElement); |
if (escape_analysis()->IsVirtual(NodeProperties::GetValueInput(node, 0))) { |
if (FLAG_trace_turbo_escape) { |
- PrintF("Removed store field #%d from effect chain\n", node->id()); |
+ PrintF("Removed #%d (%s) from effect chain\n", node->id(), |
+ node->op()->mnemonic()); |
} |
RelaxEffectsAndControls(node); |
return Changed(node); |
@@ -90,7 +96,7 @@ Reduction EscapeAnalysisReducer::ReduceFinishRegion(Node* node) { |
if (FLAG_trace_turbo_escape) { |
PrintF("Removed region #%d / #%d from effect chain,", effect->id(), |
node->id()); |
- PrintF("%d user(s) of #%d remain(s):", node->UseCount(), node->id()); |
+ PrintF(" %d user(s) of #%d remain(s):", node->UseCount(), node->id()); |
for (Edge edge : node->use_edges()) { |
PrintF(" #%d", edge.from()->id()); |
} |