| Index: src/compiler/scheduler.cc
|
| diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
|
| index 4952827124a80c985d2558da024e739c5154e419..16773c5cba00b290045ea02a5a14d8750c77bbe7 100644
|
| --- a/src/compiler/scheduler.cc
|
| +++ b/src/compiler/scheduler.cc
|
| @@ -28,8 +28,10 @@ static inline void Trace(const char* msg, ...) {
|
| }
|
|
|
|
|
| -Scheduler::Scheduler(Zone* zone, Graph* graph, Schedule* schedule)
|
| - : zone_(zone),
|
| +Scheduler::Scheduler(ZonePool* zone_pool, Zone* zone, Graph* graph,
|
| + Schedule* schedule)
|
| + : zone_pool_(zone_pool),
|
| + zone_(zone),
|
| graph_(graph),
|
| schedule_(schedule),
|
| scheduled_nodes_(zone),
|
| @@ -38,17 +40,17 @@ Scheduler::Scheduler(Zone* zone, Graph* graph, Schedule* schedule)
|
| has_floating_control_(false) {}
|
|
|
|
|
| -Schedule* Scheduler::ComputeSchedule(Graph* graph) {
|
| +Schedule* Scheduler::ComputeSchedule(ZonePool* zone_pool, Graph* graph) {
|
| Schedule* schedule;
|
| bool had_floating_control = false;
|
| do {
|
| - Zone tmp_zone(graph->zone()->isolate());
|
| + ZonePool::Scope zone_scope(zone_pool);
|
| schedule = new (graph->zone())
|
| Schedule(graph->zone(), static_cast<size_t>(graph->NodeCount()));
|
| - Scheduler scheduler(&tmp_zone, graph, schedule);
|
| + Scheduler scheduler(zone_pool, zone_scope.zone(), graph, schedule);
|
|
|
| scheduler.BuildCFG();
|
| - Scheduler::ComputeSpecialRPO(schedule);
|
| + Scheduler::ComputeSpecialRPO(zone_pool, schedule);
|
| scheduler.GenerateImmediateDominatorTree();
|
|
|
| scheduler.PrepareUses();
|
| @@ -672,10 +674,11 @@ void Scheduler::ScheduleLate() {
|
| ScheduleLateNodeVisitor schedule_late_visitor(this);
|
|
|
| {
|
| - Zone zone(zone_->isolate());
|
| + ZonePool::Scope zone_scope(zone_pool_);
|
| + Zone* zone = zone_scope.zone();
|
| GenericGraphVisit::Visit<ScheduleLateNodeVisitor,
|
| NodeInputIterationTraits<Node> >(
|
| - graph_, &zone, schedule_root_nodes_.begin(), schedule_root_nodes_.end(),
|
| + graph_, zone, schedule_root_nodes_.begin(), schedule_root_nodes_.end(),
|
| &schedule_late_visitor);
|
| }
|
|
|
| @@ -999,9 +1002,10 @@ static void VerifySpecialRPO(int num_loops, LoopInfo* loops,
|
| // 2. All loops are contiguous in the order (i.e. no intervening blocks that
|
| // do not belong to the loop.)
|
| // Note a simple RPO traversal satisfies (1) but not (3).
|
| -BasicBlockVector* Scheduler::ComputeSpecialRPO(Schedule* schedule) {
|
| - Zone tmp_zone(schedule->zone()->isolate());
|
| - Zone* zone = &tmp_zone;
|
| +BasicBlockVector* Scheduler::ComputeSpecialRPO(ZonePool* zone_pool,
|
| + Schedule* schedule) {
|
| + ZonePool::Scope zone_scope(zone_pool);
|
| + Zone* zone = zone_scope.zone();
|
| Trace("--- COMPUTING SPECIAL RPO ----------------------------------\n");
|
| // RPO should not have been computed for this schedule yet.
|
| CHECK_EQ(kBlockUnvisited1, schedule->start()->rpo_number());
|
|
|