Commit bf511473 authored by jarin@chromium.org's avatar jarin@chromium.org

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
parent f32b9ca5
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment