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

Unified Diff: src/compiler/verifier.cc

Issue 602083003: Fix scheduler to correctly schedule nested diamonds. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index 23cec7a809794623625823e99d8f0b2688508d6b..26d5373b65491ee557cbd81220966f135aca842a 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -271,6 +271,12 @@ static bool HasDominatingDef(Schedule* schedule, Node* node,
}
+static bool Dominates(Schedule* schedule, Node* dominator, Node* dominee) {
titzer 2014/09/25 12:19:24 You should walk up the dominator tree and very the
titzer 2014/09/26 10:44:38 BTW can you split this check out into a separate C
sigurds 2014/09/26 11:35:24 Done.
+ return schedule->block(dominator)->rpo_number_ <=
+ schedule->block(dominee)->rpo_number_;
+}
+
+
static void CheckInputsDominate(Schedule* schedule, BasicBlock* block,
Node* node, int use_pos) {
for (int j = OperatorProperties::GetValueInputCount(node->op()) - 1; j >= 0;
@@ -289,6 +295,15 @@ static void CheckInputsDominate(Schedule* schedule, BasicBlock* block,
input->op()->mnemonic());
}
}
+ if (OperatorProperties::GetControlInputCount(node->op()) == 1) {
+ Node* ctl = NodeProperties::GetControlInput(node);
+ if (!Dominates(schedule, ctl, node)) {
+ V8_Fatal(__FILE__, __LINE__,
+ "Node #%d:%s in B%d is not dominated by control input #%d:%s",
+ node->id(), node->op()->mnemonic(), block->id(), ctl->id(),
+ ctl->op()->mnemonic());
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698