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

Unified Diff: src/compiler/verifier.cc

Issue 1020873002: [turbofan] Fix GVN of projections and add verification for projection uniqueness. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/scheduler.cc ('k') | no next file » | 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 348e09059541ce1ed09228d41ad55f3921a2759c..534b68441494c30a0ad338edef9328576fdbb533 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -825,7 +825,23 @@ void Verifier::Run(Graph* graph, Typing typing) {
CHECK_NOT_NULL(graph->end());
Zone zone;
Visitor visitor(&zone, typing);
- for (Node* node : AllNodes(&zone, graph).live) visitor.Check(node);
+ AllNodes all(&zone, graph);
+ for (Node* node : all.live) visitor.Check(node);
+
+ // Check the uniqueness of projections.
+ for (Node* proj : all.live) {
+ if (proj->opcode() != IrOpcode::kProjection) continue;
+ Node* node = proj->InputAt(0);
+ for (Node* other : node->uses()) {
+ if (all.IsLive(other) && other != proj &&
+ other->opcode() == IrOpcode::kProjection &&
+ ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) {
+ V8_Fatal(__FILE__, __LINE__,
+ "Node #%d:%s has duplicate projections #%d and #%d",
+ node->id(), node->op()->mnemonic(), proj->id(), other->id());
+ }
+ }
+ }
}
« no previous file with comments | « src/compiler/scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698