Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Side by Side Diff: src/compiler/schedule.cc

Issue 2606923002: [csa] Improve propagation of deferred block mark (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698