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

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

Issue 710333002: Scheduler checks that end block doesn't have successors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/compiler/test-scheduler.cc » ('j') | 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 <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/bit-vector.h" 10 #include "src/bit-vector.h"
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 order_(NULL), 528 order_(NULL),
529 loops_(zone), 529 loops_(zone),
530 beyond_end_(NULL), 530 beyond_end_(NULL),
531 backedges_(1, zone), 531 backedges_(1, zone),
532 stack_(zone), 532 stack_(zone),
533 previous_block_count_(0) {} 533 previous_block_count_(0) {}
534 534
535 // Computes the special reverse-post-order for the main control flow graph, 535 // Computes the special reverse-post-order for the main control flow graph,
536 // that is for the graph spanned between the schedule's start and end blocks. 536 // that is for the graph spanned between the schedule's start and end blocks.
537 void ComputeSpecialRPO() { 537 void ComputeSpecialRPO() {
538 DCHECK(schedule_->end()->SuccessorCount() == 0);
538 DCHECK_EQ(NULL, order_); // Main order does not exist yet. 539 DCHECK_EQ(NULL, order_); // Main order does not exist yet.
539 // TODO(mstarzinger): Should use Schedule::end() after tests are fixed. 540 ComputeAndInsertSpecialRPO(schedule_->start(), schedule_->end());
540 ComputeAndInsertSpecialRPO(schedule_->start(), NULL);
541 } 541 }
542 542
543 // Computes the special reverse-post-order for a partial control flow graph, 543 // Computes the special reverse-post-order for a partial control flow graph,
544 // that is for the graph spanned between the given {entry} and {end} blocks, 544 // that is for the graph spanned between the given {entry} and {end} blocks,
545 // then updates the existing ordering with this new information. 545 // then updates the existing ordering with this new information.
546 void UpdateSpecialRPO(BasicBlock* entry, BasicBlock* end) { 546 void UpdateSpecialRPO(BasicBlock* entry, BasicBlock* end) {
547 DCHECK_NE(NULL, order_); // Main order to be updated is present. 547 DCHECK_NE(NULL, order_); // Main order to be updated is present.
548 ComputeAndInsertSpecialRPO(entry, end); 548 ComputeAndInsertSpecialRPO(entry, end);
549 } 549 }
550 550
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 for (NodeVectorIter i = nodes->begin(); i != nodes->end(); ++i) { 1474 for (NodeVectorIter i = nodes->begin(); i != nodes->end(); ++i) {
1475 schedule_->SetBlockForNode(to, *i); 1475 schedule_->SetBlockForNode(to, *i);
1476 scheduled_nodes_[to->id().ToSize()].push_back(*i); 1476 scheduled_nodes_[to->id().ToSize()].push_back(*i);
1477 } 1477 }
1478 nodes->clear(); 1478 nodes->clear();
1479 } 1479 }
1480 1480
1481 } // namespace compiler 1481 } // namespace compiler
1482 } // namespace internal 1482 } // namespace internal
1483 } // namespace v8 1483 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698