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

Unified Diff: src/compiler/escape-analysis-reducer.cc

Issue 1499143002: Improve escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug Created 5 years 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 | « src/compiler/escape-analysis-reducer.h ('k') | test/mjsunit/compiler/escape-analysis-7.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « src/compiler/escape-analysis-reducer.h ('k') | test/mjsunit/compiler/escape-analysis-7.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698