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

Unified Diff: test/cctest/compiler/test-scheduler.cc

Issue 864293002: [turbofan] Cleanup Schedule and related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address auto comments. 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 | « test/cctest/compiler/test-schedule.cc ('k') | test/unittests/compiler/schedule-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-scheduler.cc
diff --git a/test/cctest/compiler/test-scheduler.cc b/test/cctest/compiler/test-scheduler.cc
index 1b79ed5449d546ee11c8a23b5356d16b9e8f6e16..6ad790533d9b2fe4f606c1517fee7f79f7a4452d 100644
--- a/test/cctest/compiler/test-scheduler.cc
+++ b/test/cctest/compiler/test-scheduler.cc
@@ -86,21 +86,13 @@ static TestLoop* CreateLoop(Schedule* schedule, int count) {
}
-static int GetScheduledNodeCount(Schedule* schedule) {
- int node_count = 0;
- for (BasicBlockVectorIter i = schedule->rpo_order()->begin();
- i != schedule->rpo_order()->end(); ++i) {
- BasicBlock* block = *i;
- for (BasicBlock::const_iterator j = block->begin(); j != block->end();
- ++j) {
- ++node_count;
- }
- BasicBlock::Control control = block->control();
- if (control != BasicBlock::kNone) {
- ++node_count;
- }
+static int GetScheduledNodeCount(const Schedule* schedule) {
+ size_t node_count = 0;
+ for (auto block : *schedule->rpo_order()) {
+ node_count += block->NodeCount();
+ if (block->control() != BasicBlock::kNone) ++node_count;
}
- return node_count;
+ return static_cast<int>(node_count);
}
« no previous file with comments | « test/cctest/compiler/test-schedule.cc ('k') | test/unittests/compiler/schedule-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698