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 #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 Loading... |
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_ |
OLD | NEW |