| 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_SCHEDULE_H_ | 5 #ifndef V8_COMPILER_SCHEDULE_H_ |
| 6 #define V8_COMPILER_SCHEDULE_H_ | 6 #define V8_COMPILER_SCHEDULE_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 BasicBlock* loop_header() const { return loop_header_; } | 157 BasicBlock* loop_header() const { return loop_header_; } |
| 158 void set_loop_header(BasicBlock* loop_header); | 158 void set_loop_header(BasicBlock* loop_header); |
| 159 | 159 |
| 160 BasicBlock* loop_end() const { return loop_end_; } | 160 BasicBlock* loop_end() const { return loop_end_; } |
| 161 void set_loop_end(BasicBlock* loop_end); | 161 void set_loop_end(BasicBlock* loop_end); |
| 162 | 162 |
| 163 int32_t loop_depth() const { return loop_depth_; } | 163 int32_t loop_depth() const { return loop_depth_; } |
| 164 void set_loop_depth(int32_t loop_depth); | 164 void set_loop_depth(int32_t loop_depth); |
| 165 | 165 |
| 166 RpoNumber GetAoNumber() const { return RpoNumber::FromInt(ao_number_); } | 166 int32_t loop_number() const { return loop_number_; } |
| 167 int32_t ao_number() const { return ao_number_; } | 167 void set_loop_number(int32_t loop_number) { loop_number_ = loop_number; } |
| 168 void set_ao_number(int32_t ao_number) { ao_number_ = ao_number; } | |
| 169 | 168 |
| 170 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); } | 169 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); } |
| 171 int32_t rpo_number() const { return rpo_number_; } | 170 int32_t rpo_number() const { return rpo_number_; } |
| 172 void set_rpo_number(int32_t rpo_number); | 171 void set_rpo_number(int32_t rpo_number); |
| 173 | 172 |
| 174 // Loop membership helpers. | 173 // Loop membership helpers. |
| 175 inline bool IsLoopHeader() const { return loop_end_ != NULL; } | 174 inline bool IsLoopHeader() const { return loop_end_ != NULL; } |
| 176 bool LoopContains(BasicBlock* block) const; | 175 bool LoopContains(BasicBlock* block) const; |
| 177 | 176 |
| 178 private: | 177 private: |
| 179 int32_t ao_number_; // assembly order number of the block. | 178 int32_t loop_number_; // loop number of the block. |
| 180 int32_t rpo_number_; // special RPO number of the block. | 179 int32_t rpo_number_; // special RPO number of the block. |
| 181 bool deferred_; // true if the block contains deferred code. | 180 bool deferred_; // true if the block contains deferred code. |
| 182 int32_t dominator_depth_; // Depth within the dominator tree. | 181 int32_t dominator_depth_; // Depth within the dominator tree. |
| 183 BasicBlock* dominator_; // Immediate dominator of the block. | 182 BasicBlock* dominator_; // Immediate dominator of the block. |
| 184 BasicBlock* rpo_next_; // Link to next block in special RPO order. | 183 BasicBlock* rpo_next_; // Link to next block in special RPO order. |
| 185 BasicBlock* loop_header_; // Pointer to dominating loop header basic block, | 184 BasicBlock* loop_header_; // Pointer to dominating loop header basic block, |
| 186 // NULL if none. For loop headers, this points to | 185 // NULL if none. For loop headers, this points to |
| 187 // enclosing loop header. | 186 // enclosing loop header. |
| 188 BasicBlock* loop_end_; // end of the loop, if this block is a loop header. | 187 BasicBlock* loop_end_; // end of the loop, if this block is a loop header. |
| 189 int32_t loop_depth_; // loop nesting, 0 is top-level | 188 int32_t loop_depth_; // loop nesting, 0 is top-level |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 DISALLOW_COPY_AND_ASSIGN(Schedule); | 286 DISALLOW_COPY_AND_ASSIGN(Schedule); |
| 288 }; | 287 }; |
| 289 | 288 |
| 290 std::ostream& operator<<(std::ostream& os, const Schedule& s); | 289 std::ostream& operator<<(std::ostream& os, const Schedule& s); |
| 291 | 290 |
| 292 } // namespace compiler | 291 } // namespace compiler |
| 293 } // namespace internal | 292 } // namespace internal |
| 294 } // namespace v8 | 293 } // namespace v8 |
| 295 | 294 |
| 296 #endif // V8_COMPILER_SCHEDULE_H_ | 295 #endif // V8_COMPILER_SCHEDULE_H_ |
| OLD | NEW |