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 "src/compiler/schedule.h" | 5 #include "src/compiler/schedule.h" |
6 | 6 |
7 #include "src/compiler/node.h" | 7 #include "src/compiler/node.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 | 10 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // Push forward the deferred block marks through newly inserted blocks and | 400 // Push forward the deferred block marks through newly inserted blocks and |
401 // other improperly marked blocks until a fixed point is reached. | 401 // other improperly marked blocks until a fixed point is reached. |
402 // TODO(danno): optimize the propagation | 402 // TODO(danno): optimize the propagation |
403 bool done = false; | 403 bool done = false; |
404 while (!done) { | 404 while (!done) { |
405 done = true; | 405 done = true; |
406 for (auto block : all_blocks_) { | 406 for (auto block : all_blocks_) { |
407 if (!block->deferred()) { | 407 if (!block->deferred()) { |
408 bool deferred = block->PredecessorCount() > 0; | 408 bool deferred = block->PredecessorCount() > 0; |
409 for (auto pred : block->predecessors()) { | 409 for (auto pred : block->predecessors()) { |
410 if (!pred->deferred()) { | 410 if (!pred->deferred() && (pred->rpo_number() < block->rpo_number())) { |
411 deferred = false; | 411 deferred = false; |
412 } | 412 } |
413 } | 413 } |
414 if (deferred) { | 414 if (deferred) { |
415 block->set_deferred(true); | 415 block->set_deferred(true); |
416 done = false; | 416 done = false; |
417 } | 417 } |
418 } | 418 } |
419 } | 419 } |
420 } | 420 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 } | 502 } |
503 os << "\n"; | 503 os << "\n"; |
504 } | 504 } |
505 } | 505 } |
506 return os; | 506 return os; |
507 } | 507 } |
508 | 508 |
509 } // namespace compiler | 509 } // namespace compiler |
510 } // namespace internal | 510 } // namespace internal |
511 } // namespace v8 | 511 } // namespace v8 |
OLD | NEW |