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

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

Issue 606403003: Refactor BasicBlock, no inheritance from GenericNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Attempt n+1 to address the size_t madness Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/schedule.cc ('k') | src/compiler/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 #ifndef V8_COMPILER_SCHEDULER_H_ 5 #ifndef V8_COMPILER_SCHEDULER_H_
6 #define V8_COMPILER_SCHEDULER_H_ 6 #define V8_COMPILER_SCHEDULER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 SchedulerData* GetData(Node* node) { 59 SchedulerData* GetData(Node* node) {
60 DCHECK(node->id() < static_cast<int>(node_data_.size())); 60 DCHECK(node->id() < static_cast<int>(node_data_.size()));
61 return &node_data_[node->id()]; 61 return &node_data_[node->id()];
62 } 62 }
63 63
64 void BuildCFG(); 64 void BuildCFG();
65 65
66 Placement GetPlacement(Node* node); 66 Placement GetPlacement(Node* node);
67 67
68 int GetRPONumber(BasicBlock* block) { 68 int GetRPONumber(BasicBlock* block) {
69 DCHECK(block->rpo_number_ >= 0 && 69 DCHECK(block->rpo_number() >= 0 &&
70 block->rpo_number_ < static_cast<int>(schedule_->rpo_order_.size())); 70 block->rpo_number() <
71 DCHECK(schedule_->rpo_order_[block->rpo_number_] == block); 71 static_cast<int>(schedule_->rpo_order_.size()));
72 return block->rpo_number_; 72 DCHECK(schedule_->rpo_order_[block->rpo_number()] == block);
73 return block->rpo_number();
73 } 74 }
74 75
75 void GenerateImmediateDominatorTree(); 76 void GenerateImmediateDominatorTree();
76 BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2); 77 BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2);
77 78
78 friend class CFGBuilder; 79 friend class CFGBuilder;
79 80
80 friend class ScheduleEarlyNodeVisitor; 81 friend class ScheduleEarlyNodeVisitor;
81 void ScheduleEarly(); 82 void ScheduleEarly();
82 83
83 friend class PrepareUsesVisitor; 84 friend class PrepareUsesVisitor;
84 void PrepareUses(); 85 void PrepareUses();
85 86
86 friend class ScheduleLateNodeVisitor; 87 friend class ScheduleLateNodeVisitor;
87 void ScheduleLate(); 88 void ScheduleLate();
88 89
89 bool ConnectFloatingControl(); 90 bool ConnectFloatingControl();
90 91
91 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node); 92 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
92 }; 93 };
93 } 94 }
94 } 95 }
95 } // namespace v8::internal::compiler 96 } // namespace v8::internal::compiler
96 97
97 #endif // V8_COMPILER_SCHEDULER_H_ 98 #endif // V8_COMPILER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « src/compiler/schedule.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698