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

Unified Diff: src/compiler/typer.cc

Issue 2222513002: [turbofan] Insert sigma nodes for loop variable backedge. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 316a4090cfc74b00b5bfbd953b283bc6c26796e4..e32c6495c0c5a5c1e3e1d0841ebde969874684f8 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -4,6 +4,8 @@
#include "src/compiler/typer.h"
+#include <iomanip>
+
#include "src/base/flags.h"
#include "src/bootstrapper.h"
#include "src/compiler/common-operator.h"
@@ -318,7 +320,7 @@ void Typer::Run(const NodeVector& roots,
graph_reducer.ReduceGraph();
if (induction_vars != nullptr) {
- induction_vars->ChangeFromInductionVariablePhis();
+ induction_vars->ChangeToPhisAndInsertSigmas();
}
}
@@ -823,6 +825,7 @@ Type* Typer::Visitor::TypeInductionVariablePhi(Node* node) {
}
if (FLAG_trace_turbo_loop) {
OFStream os(stdout);
+ os << std::setprecision(10);
os << "Loop (" << NodeProperties::GetControlInput(node)->id()
<< ") variable bounds for phi " << node->id() << ": (" << min << ", "
<< max << ")\n";
@@ -893,6 +896,11 @@ Type* Typer::Visitor::TypeProjection(Node* node) {
return Type::Any();
}
+Type* Typer::Visitor::TypeSigma(Node* node) {
+ Type* const type = Operand(node, 0);
+ return typer_->operation_typer()->TypeSigma(node->op(), type);
+}
+
Type* Typer::Visitor::TypeDead(Node* node) { return Type::None(); }
// JS comparison operators.

Powered by Google App Engine
This is Rietveld 408576698