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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ZoneVector<SchedulerData> node_data_; // Per-node data for all nodes. | 62 ZoneVector<SchedulerData> node_data_; // Per-node data for all nodes. |
63 | 63 |
64 Scheduler(Zone* zone, Graph* graph, Schedule* schedule); | 64 Scheduler(Zone* zone, Graph* graph, Schedule* schedule); |
65 | 65 |
66 inline SchedulerData DefaultSchedulerData(); | 66 inline SchedulerData DefaultSchedulerData(); |
67 inline SchedulerData* GetData(Node* node); | 67 inline SchedulerData* GetData(Node* node); |
68 | 68 |
69 Placement GetPlacement(Node* node); | 69 Placement GetPlacement(Node* node); |
70 void UpdatePlacement(Node* node, Placement placement); | 70 void UpdatePlacement(Node* node, Placement placement); |
71 | 71 |
72 void IncrementUnscheduledUseCount(Node* node, Node* from); | 72 inline bool IsCoupledControlEdge(Node* node, int index); |
73 void DecrementUnscheduledUseCount(Node* node, Node* from); | 73 void IncrementUnscheduledUseCount(Node* node, int index, Node* from); |
| 74 void DecrementUnscheduledUseCount(Node* node, int index, Node* from); |
74 | 75 |
75 inline int GetRPONumber(BasicBlock* block); | 76 inline int GetRPONumber(BasicBlock* block); |
76 BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2); | 77 BasicBlock* GetCommonDominator(BasicBlock* b1, BasicBlock* b2); |
77 | 78 |
78 // Phase 1: Build control-flow graph. | 79 // Phase 1: Build control-flow graph. |
79 friend class CFGBuilder; | 80 friend class CFGBuilder; |
80 void BuildCFG(); | 81 void BuildCFG(); |
81 | 82 |
82 // Phase 2: Compute special RPO and dominator tree. | 83 // Phase 2: Compute special RPO and dominator tree. |
83 friend class SpecialRPONumberer; | 84 friend class SpecialRPONumberer; |
(...skipping 14 matching lines...) Expand all Loading... |
98 | 99 |
99 void FuseFloatingControl(BasicBlock* block, Node* node); | 100 void FuseFloatingControl(BasicBlock* block, Node* node); |
100 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); | 101 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace compiler | 104 } // namespace compiler |
104 } // namespace internal | 105 } // namespace internal |
105 } // namespace v8 | 106 } // namespace v8 |
106 | 107 |
107 #endif // V8_COMPILER_SCHEDULER_H_ | 108 #endif // V8_COMPILER_SCHEDULER_H_ |
OLD | NEW |