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

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

Issue 1510973006: Stabilize escape analysis (without deopt) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-guard-bug
Patch Set: Rebase 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') | src/compiler/pipeline.cc » ('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 f833ebdf73060aaa86824a0e6a7444bb6fce77e3..5fa01999c787c0099e03211c4e472a67b33279bd 100644
--- a/src/compiler/escape-analysis-reducer.cc
+++ b/src/compiler/escape-analysis-reducer.cc
@@ -34,6 +34,8 @@ Reduction EscapeAnalysisReducer::Reduce(Node* node) {
return ReduceFinishRegion(node);
case IrOpcode::kReferenceEqual:
return ReduceReferenceEqual(node);
+ case IrOpcode::kObjectIsSmi:
+ return ReduceObjectIsSmi(node);
case IrOpcode::kStateValues:
case IrOpcode::kFrameState:
return ReplaceWithDeoptDummy(node);
@@ -146,6 +148,20 @@ Reduction EscapeAnalysisReducer::ReduceReferenceEqual(Node* node) {
}
+Reduction EscapeAnalysisReducer::ReduceObjectIsSmi(Node* node) {
+ DCHECK_EQ(node->opcode(), IrOpcode::kObjectIsSmi);
+ Node* input = NodeProperties::GetValueInput(node, 0);
+ if (escape_analysis()->IsVirtual(input)) {
+ ReplaceWithValue(node, jsgraph()->FalseConstant());
+ if (FLAG_trace_turbo_escape) {
+ PrintF("Replaced ObjectIsSmi #%d with false\n", node->id());
+ }
+ return Replace(node);
+ }
+ return NoChange();
+}
+
+
// TODO(sigurds): This is a temporary solution until escape analysis
// supports deoptimization.
Reduction EscapeAnalysisReducer::ReplaceWithDeoptDummy(Node* node) {
« no previous file with comments | « src/compiler/escape-analysis-reducer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698