OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <deque> | 5 #include <deque> |
6 #include <queue> | 6 #include <queue> |
7 | 7 |
8 #include "src/compiler/scheduler.h" | 8 #include "src/compiler/scheduler.h" |
9 | 9 |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 int current_rpo_pos = GetRPONumber(current_rpo); | 338 int current_rpo_pos = GetRPONumber(current_rpo); |
339 while (current_pred != end) { | 339 while (current_pred != end) { |
340 // Don't examine backwards edges | 340 // Don't examine backwards edges |
341 BasicBlock* pred = *current_pred; | 341 BasicBlock* pred = *current_pred; |
342 if (GetRPONumber(pred) < current_rpo_pos) { | 342 if (GetRPONumber(pred) < current_rpo_pos) { |
343 dominator = GetCommonDominator(dominator, *current_pred); | 343 dominator = GetCommonDominator(dominator, *current_pred); |
344 } | 344 } |
345 ++current_pred; | 345 ++current_pred; |
346 } | 346 } |
347 current_rpo->set_dominator(dominator); | 347 current_rpo->set_dominator(dominator); |
348 Trace("Block %d's idom is %d\n", current_rpo->id(), | 348 Trace("Block %d's idom is %d\n", current_rpo->id().ToInt(), |
349 dominator->id().ToInt()); | 349 dominator->id().ToInt()); |
350 } | 350 } |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 | 354 |
355 class ScheduleEarlyNodeVisitor : public NullNodeVisitor { | 355 class ScheduleEarlyNodeVisitor : public NullNodeVisitor { |
356 public: | 356 public: |
357 explicit ScheduleEarlyNodeVisitor(Scheduler* scheduler) | 357 explicit ScheduleEarlyNodeVisitor(Scheduler* scheduler) |
358 : has_changed_rpo_constraints_(true), | 358 : has_changed_rpo_constraints_(true), |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 | 1125 |
1126 #if DEBUG | 1126 #if DEBUG |
1127 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); | 1127 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); |
1128 VerifySpecialRPO(num_loops, loops, final_order); | 1128 VerifySpecialRPO(num_loops, loops, final_order); |
1129 #endif | 1129 #endif |
1130 return final_order; | 1130 return final_order; |
1131 } | 1131 } |
1132 } | 1132 } |
1133 } | 1133 } |
1134 } // namespace v8::internal::compiler | 1134 } // namespace v8::internal::compiler |
OLD | NEW |