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

Unified Diff: src/compiler/scheduler.cc

Issue 603533002: [turbofan] more verification of rpo (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
« no previous file with comments | « no previous file | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index 402995006b410b9f2fc45df9b53f36b00f677acc..242c580aaaf6907bc4aab7d3a69bba50f53dd0aa 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -865,6 +865,19 @@ static void VerifySpecialRPO(int num_loops, LoopInfo* loops,
DCHECK(order->size() > 0);
DCHECK((*order)[0]->id() == 0); // entry should be first.
+ // All predecessors and successors should be in rpo.
+ for (BasicBlockVector::iterator i = order->begin(); i != order->end(); ++i) {
+ BasicBlock* block = *i;
+ BasicBlock::Predecessors p = block->predecessors();
+ for (BasicBlock::Predecessors::iterator j = p.begin(); j != p.end(); ++j) {
+ DCHECK((*j)->rpo_number_ >= 0);
+ }
+ BasicBlock::Successors s = block->successors();
+ for (BasicBlock::Successors::iterator j = s.begin(); j != s.end(); ++j) {
+ DCHECK((*j)->rpo_number_ >= 0);
+ }
+ }
titzer 2014/09/25 14:52:58 Can we put this new code into ScheduleVerifier::Ru
dcarney 2014/09/29 13:29:54 Done.
+
for (int i = 0; i < num_loops; i++) {
LoopInfo* loop = &loops[i];
BasicBlock* header = loop->header;
« no previous file with comments | « no previous file | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698