From bf5114736cd91d81ba224431d61922c3a98a6662 Mon Sep 17 00:00:00 2001 From: "jarin@chromium.org" Date: Sat, 16 Aug 2014 18:58:13 +0000 Subject: [PATCH] During graph scheduling, traverse the roots in one go. This makes the scheduler more than 30x faster on zlib. BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/474963002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler/scheduler.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc index dc497e7..d7eb50d 100644 --- a/src/compiler/scheduler.cc +++ b/src/compiler/scheduler.cc @@ -621,13 +621,12 @@ void Scheduler::ScheduleLate() { // Schedule: Places nodes in dominator block of all their uses. ScheduleLateNodeVisitor schedule_late_visitor(this); - for (NodeVectorIter i = schedule_root_nodes_.begin(); - i != schedule_root_nodes_.end(); ++i) { - // TODO(mstarzinger): Make the scheduler eat less memory. + { Zone zone(zone_->isolate()); GenericGraphVisit::Visit >( - graph_, &zone, *i, &schedule_late_visitor); + graph_, &zone, schedule_root_nodes_.begin(), schedule_root_nodes_.end(), + &schedule_late_visitor); } // Add collected nodes for basic blocks to their blocks in the right order. -- 2.7.4