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

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

Issue 2369953002: [turbofan] Fix indirect escapes in escape analysis. (Closed)
Patch Set: Created 4 years, 3 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 | test/mjsunit/compiler/regress-escape-analysis-indirect.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 bcd91e302fb1591249760eb35ff2648bbd1fe9f5..d997813d013b58339f9ea6ef7f9bd6627ed84daa 100644
--- a/src/compiler/escape-analysis-reducer.cc
+++ b/src/compiler/escape-analysis-reducer.cc
@@ -120,13 +120,15 @@ Reduction EscapeAnalysisReducer::ReduceLoad(Node* node) {
if (node->id() < static_cast<NodeId>(fully_reduced_.length())) {
fully_reduced_.Add(node->id());
}
- if (Node* rep = escape_analysis()->GetReplacement(node)) {
- isolate()->counters()->turbo_escape_loads_replaced()->Increment();
- TRACE("Replaced #%d (%s) with #%d (%s)\n", node->id(),
- node->op()->mnemonic(), rep->id(), rep->op()->mnemonic());
- rep = MaybeGuard(jsgraph(), node, rep);
- ReplaceWithValue(node, rep);
- return Replace(rep);
+ if (escape_analysis()->IsVirtual(NodeProperties::GetValueInput(node, 0))) {
+ if (Node* rep = escape_analysis()->GetReplacement(node)) {
+ isolate()->counters()->turbo_escape_loads_replaced()->Increment();
+ TRACE("Replaced #%d (%s) with #%d (%s)\n", node->id(),
+ node->op()->mnemonic(), rep->id(), rep->op()->mnemonic());
+ rep = MaybeGuard(jsgraph(), node, rep);
+ ReplaceWithValue(node, rep);
+ return Replace(rep);
+ }
}
return NoChange();
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-escape-analysis-indirect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698