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
This commit is contained in:
jarin@chromium.org 2014-08-16 18:58:13 +00:00
parent f32b9ca516
commit bf5114736c

View File

@ -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<ScheduleLateNodeVisitor,
NodeInputIterationTraits<Node> >(
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.