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

Unified Diff: src/compiler/verifier.cc

Issue 875263004: [turbofan] Ensure that NTLs are always properly connected to the end. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/typer.cc ('k') | test/cctest/compiler/test-control-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index 47edd35d553172346ee9967e24cf161a8b69988c..85c6caa539fc7748f5a5d20251e369dc3e04c615 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -178,6 +178,16 @@ void Verifier::Visitor::Check(Node* node) {
}
switch (node->opcode()) {
+ case IrOpcode::kAlways:
+ // Always has no inputs.
+ CHECK_EQ(0, input_count);
+ // Always uses are Branch.
+ for (auto use : node->uses()) {
+ CHECK(use->opcode() == IrOpcode::kBranch);
+ }
+ // Type is boolean.
+ CheckUpperIs(node, Type::Boolean());
+ break;
case IrOpcode::kStart:
// Start has no inputs.
CHECK_EQ(0, input_count);
@@ -233,12 +243,6 @@ void Verifier::Visitor::Check(Node* node) {
// Type is empty.
CheckNotTyped(node);
break;
- case IrOpcode::kTerminate:
- // Type is empty.
- CheckNotTyped(node);
- CHECK_EQ(1, control_count);
- CHECK_EQ(input_count, 1 + effect_count);
- break;
case IrOpcode::kOsrNormalEntry:
case IrOpcode::kOsrLoopEntry:
// Osr entries have
@@ -348,6 +352,12 @@ void Verifier::Visitor::Check(Node* node) {
CHECK_EQ(input_count, 1 + effect_count);
break;
}
+ case IrOpcode::kEffectSet: {
+ CHECK_EQ(0, value_count);
+ CHECK_EQ(0, control_count);
+ CHECK_LT(1, effect_count);
+ break;
+ }
case IrOpcode::kValueEffect:
// TODO(rossberg): what are the constraints on these?
break;
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/compiler/test-control-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698