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

Unified Diff: src/compiler/typer.cc

Issue 930003003: [turbofan] Transfer types from loop phis to OSR values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/compiler/osr.cc ('k') | test/cctest/compiler/test-osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index f646d19ba13d3ab03a318e328b93316639823c94..9af65597bf5527e9d60ca3c67b38300726cfe1bb 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -623,11 +623,16 @@ Bounds Typer::Visitor::TypeParameter(Node* node) {
Bounds Typer::Visitor::TypeOsrValue(Node* node) {
- // OSR values explicitly have type {None} before OSR form is deconstructed.
if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) {
+ // Before deconstruction, OSR values have type {None} to avoid polluting
+ // the types of phis and other nodes in the graph.
return Bounds(Type::None(), Type::None());
}
- // TODO(turbofan): preserve the type of OSR values after deconstruction.
+ if (NodeProperties::IsTyped(node)) {
+ // After deconstruction, OSR values may have had a type explicitly set.
+ return NodeProperties::GetBounds(node);
+ }
+ // Otherwise, be conservative.
return Bounds::Unbounded(zone());
}
« no previous file with comments | « src/compiler/osr.cc ('k') | test/cctest/compiler/test-osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698