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

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

Issue 864293002: [turbofan] Cleanup Schedule and related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address auto comments. Created 5 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/scheduler.h ('k') | src/compiler/verifier.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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 Trace("--- COMPUTING SPECIAL RPO ----------------------------------\n"); 1025 Trace("--- COMPUTING SPECIAL RPO ----------------------------------\n");
1026 1026
1027 // Compute the special reverse-post-order for basic blocks. 1027 // Compute the special reverse-post-order for basic blocks.
1028 special_rpo_ = new (zone_) SpecialRPONumberer(zone_, schedule_); 1028 special_rpo_ = new (zone_) SpecialRPONumberer(zone_, schedule_);
1029 special_rpo_->ComputeSpecialRPO(); 1029 special_rpo_->ComputeSpecialRPO();
1030 } 1030 }
1031 1031
1032 1032
1033 void Scheduler::PropagateImmediateDominators(BasicBlock* block) { 1033 void Scheduler::PropagateImmediateDominators(BasicBlock* block) {
1034 for (/*nop*/; block != NULL; block = block->rpo_next()) { 1034 for (/*nop*/; block != NULL; block = block->rpo_next()) {
1035 BasicBlock::Predecessors::iterator pred = block->predecessors_begin(); 1035 auto pred = block->predecessors().begin();
1036 BasicBlock::Predecessors::iterator end = block->predecessors_end(); 1036 auto end = block->predecessors().end();
1037 DCHECK(pred != end); // All blocks except start have predecessors. 1037 DCHECK(pred != end); // All blocks except start have predecessors.
1038 BasicBlock* dominator = *pred; 1038 BasicBlock* dominator = *pred;
1039 // For multiple predecessors, walk up the dominator tree until a common 1039 // For multiple predecessors, walk up the dominator tree until a common
1040 // dominator is found. Visitation order guarantees that all predecessors 1040 // dominator is found. Visitation order guarantees that all predecessors
1041 // except for backwards edges have been visited. 1041 // except for backwards edges have been visited.
1042 for (++pred; pred != end; ++pred) { 1042 for (++pred; pred != end; ++pred) {
1043 // Don't examine backwards edges. 1043 // Don't examine backwards edges.
1044 if ((*pred)->dominator_depth() < 0) continue; 1044 if ((*pred)->dominator_depth() < 0) continue;
1045 dominator = GetCommonDominator(dominator, *pred); 1045 dominator = GetCommonDominator(dominator, *pred);
1046 } 1046 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 for (Node* const node : *nodes) { 1471 for (Node* const node : *nodes) {
1472 schedule_->SetBlockForNode(to, node); 1472 schedule_->SetBlockForNode(to, node);
1473 scheduled_nodes_[to->id().ToSize()].push_back(node); 1473 scheduled_nodes_[to->id().ToSize()].push_back(node);
1474 } 1474 }
1475 nodes->clear(); 1475 nodes->clear();
1476 } 1476 }
1477 1477
1478 } // namespace compiler 1478 } // namespace compiler
1479 } // namespace internal 1479 } // namespace internal
1480 } // namespace v8 1480 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/scheduler.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698