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

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

Issue 696363002: Make special RPO computation iterative during scheduling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 6 years, 1 month 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/instruction.cc ('k') | src/compiler/schedule.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_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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Accessors. 138 // Accessors.
139 Control control() const { return control_; } 139 Control control() const { return control_; }
140 void set_control(Control control); 140 void set_control(Control control);
141 141
142 Node* control_input() const { return control_input_; } 142 Node* control_input() const { return control_input_; }
143 void set_control_input(Node* control_input); 143 void set_control_input(Node* control_input);
144 144
145 bool deferred() const { return deferred_; } 145 bool deferred() const { return deferred_; }
146 void set_deferred(bool deferred) { deferred_ = deferred; } 146 void set_deferred(bool deferred) { deferred_ = deferred; }
147 147
148 int32_t dominator_depth() const { return dominator_depth_; }
149 void set_dominator_depth(int32_t dominator_depth);
150
148 BasicBlock* dominator() const { return dominator_; } 151 BasicBlock* dominator() const { return dominator_; }
149 void set_dominator(BasicBlock* dominator); 152 void set_dominator(BasicBlock* dominator);
150 153
151 BasicBlock* loop_header() const { return loop_header_; } 154 BasicBlock* loop_header() const { return loop_header_; }
152 void set_loop_header(BasicBlock* loop_header); 155 void set_loop_header(BasicBlock* loop_header);
153 156
157 BasicBlock* loop_end() const { return loop_end_; }
158 void set_loop_end(BasicBlock* loop_end);
159
154 int32_t loop_depth() const { return loop_depth_; } 160 int32_t loop_depth() const { return loop_depth_; }
155 void set_loop_depth(int32_t loop_depth); 161 void set_loop_depth(int32_t loop_depth);
156 162
157 int32_t loop_end() const { return loop_end_; }
158 void set_loop_end(int32_t loop_end);
159
160 RpoNumber GetAoNumber() const { return RpoNumber::FromInt(ao_number_); } 163 RpoNumber GetAoNumber() const { return RpoNumber::FromInt(ao_number_); }
161 int32_t ao_number() const { return ao_number_; } 164 int32_t ao_number() const { return ao_number_; }
162 void set_ao_number(int32_t ao_number) { ao_number_ = ao_number; } 165 void set_ao_number(int32_t ao_number) { ao_number_ = ao_number; }
163 166
164 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); } 167 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); }
165 int32_t rpo_number() const { return rpo_number_; } 168 int32_t rpo_number() const { return rpo_number_; }
166 void set_rpo_number(int32_t rpo_number); 169 void set_rpo_number(int32_t rpo_number);
167 170
168 // Loop membership helpers. 171 // Loop membership helpers.
169 inline bool IsLoopHeader() const { return loop_end_ >= 0; } 172 inline bool IsLoopHeader() const { return loop_end_ != NULL; }
170 bool LoopContains(BasicBlock* block) const; 173 bool LoopContains(BasicBlock* block) const;
171 174
172 private: 175 private:
173 int32_t ao_number_; // assembly order number of the block. 176 int32_t ao_number_; // assembly order number of the block.
174 int32_t rpo_number_; // special RPO number of the block. 177 int32_t rpo_number_; // special RPO number of the block.
175 bool deferred_; // true if the block contains deferred code. 178 bool deferred_; // true if the block contains deferred code.
179 int32_t dominator_depth_; // Depth within the dominator tree.
176 BasicBlock* dominator_; // Immediate dominator of the block. 180 BasicBlock* dominator_; // Immediate dominator of the block.
177 BasicBlock* loop_header_; // Pointer to dominating loop header basic block, 181 BasicBlock* loop_header_; // Pointer to dominating loop header basic block,
178 // NULL if none. For loop headers, this points to 182 // NULL if none. For loop headers, this points to
179 // enclosing loop header. 183 // enclosing loop header.
184 BasicBlock* loop_end_; // end of the loop, if this block is a loop header.
180 int32_t loop_depth_; // loop nesting, 0 is top-level 185 int32_t loop_depth_; // loop nesting, 0 is top-level
181 int32_t loop_end_; // end of the loop, if this block is a loop header.
182 186
183 Control control_; // Control at the end of the block. 187 Control control_; // Control at the end of the block.
184 Node* control_input_; // Input value for control. 188 Node* control_input_; // Input value for control.
185 NodeVector nodes_; // nodes of this block in forward order. 189 NodeVector nodes_; // nodes of this block in forward order.
186 190
187 Successors successors_; 191 Successors successors_;
188 Predecessors predecessors_; 192 Predecessors predecessors_;
189 Id id_; 193 Id id_;
190 194
191 DISALLOW_COPY_AND_ASSIGN(BasicBlock); 195 DISALLOW_COPY_AND_ASSIGN(BasicBlock);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 DISALLOW_COPY_AND_ASSIGN(Schedule); 285 DISALLOW_COPY_AND_ASSIGN(Schedule);
282 }; 286 };
283 287
284 std::ostream& operator<<(std::ostream& os, const Schedule& s); 288 std::ostream& operator<<(std::ostream& os, const Schedule& s);
285 289
286 } // namespace compiler 290 } // namespace compiler
287 } // namespace internal 291 } // namespace internal
288 } // namespace v8 292 } // namespace v8
289 293
290 #endif // V8_COMPILER_SCHEDULE_H_ 294 #endif // V8_COMPILER_SCHEDULE_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698