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

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

Issue 642883003: [turbofan] Add support for deferred code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add cctest 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/operator-properties-inl.h ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 nodes_.insert(insertion_point, insertion_start, insertion_end); 133 nodes_.insert(insertion_point, insertion_start, insertion_end);
134 } 134 }
135 135
136 // Accessors. 136 // Accessors.
137 Control control() const { return control_; } 137 Control control() const { return control_; }
138 void set_control(Control control); 138 void set_control(Control control);
139 139
140 Node* control_input() const { return control_input_; } 140 Node* control_input() const { return control_input_; }
141 void set_control_input(Node* control_input); 141 void set_control_input(Node* control_input);
142 142
143 bool deferred() const { return deferred_; }
144 void set_deferred(bool deferred) { deferred_ = deferred; }
145
143 BasicBlock* dominator() const { return dominator_; } 146 BasicBlock* dominator() const { return dominator_; }
144 void set_dominator(BasicBlock* dominator); 147 void set_dominator(BasicBlock* dominator);
145 148
146 BasicBlock* loop_header() const { return loop_header_; } 149 BasicBlock* loop_header() const { return loop_header_; }
147 void set_loop_header(BasicBlock* loop_header); 150 void set_loop_header(BasicBlock* loop_header);
148 151
149 int32_t loop_depth() const { return loop_depth_; } 152 int32_t loop_depth() const { return loop_depth_; }
150 void set_loop_depth(int32_t loop_depth); 153 void set_loop_depth(int32_t loop_depth);
151 154
152 int32_t loop_end() const { return loop_end_; } 155 int32_t loop_end() const { return loop_end_; }
153 void set_loop_end(int32_t loop_end); 156 void set_loop_end(int32_t loop_end);
154 157
158 RpoNumber GetAoNumber() const { return RpoNumber::FromInt(ao_number_); }
159 int32_t ao_number() const { return ao_number_; }
160 void set_ao_number(int32_t ao_number) { ao_number_ = ao_number; }
161
155 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); } 162 RpoNumber GetRpoNumber() const { return RpoNumber::FromInt(rpo_number_); }
156 int32_t rpo_number() const { return rpo_number_; } 163 int32_t rpo_number() const { return rpo_number_; }
157 void set_rpo_number(int32_t rpo_number); 164 void set_rpo_number(int32_t rpo_number);
158 165
159 // Loop membership helpers. 166 // Loop membership helpers.
160 inline bool IsLoopHeader() const { return loop_end_ >= 0; } 167 inline bool IsLoopHeader() const { return loop_end_ >= 0; }
161 bool LoopContains(BasicBlock* block) const; 168 bool LoopContains(BasicBlock* block) const;
162 169
163 private: 170 private:
171 int32_t ao_number_; // assembly order number of the block.
164 int32_t rpo_number_; // special RPO number of the block. 172 int32_t rpo_number_; // special RPO number of the block.
173 bool deferred_; // true if the block contains deferred code.
165 BasicBlock* dominator_; // Immediate dominator of the block. 174 BasicBlock* dominator_; // Immediate dominator of the block.
166 BasicBlock* loop_header_; // Pointer to dominating loop header basic block, 175 BasicBlock* loop_header_; // Pointer to dominating loop header basic block,
167 // NULL if none. For loop headers, this points to 176 // NULL if none. For loop headers, this points to
168 // enclosing loop header. 177 // enclosing loop header.
169 int32_t loop_depth_; // loop nesting, 0 is top-level 178 int32_t loop_depth_; // loop nesting, 0 is top-level
170 int32_t loop_end_; // end of the loop, if this block is a loop header. 179 int32_t loop_end_; // end of the loop, if this block is a loop header.
171 180
172 Control control_; // Control at the end of the block. 181 Control control_; // Control at the end of the block.
173 Node* control_input_; // Input value for control. 182 Node* control_input_; // Input value for control.
174 NodeVector nodes_; // nodes of this block in forward order. 183 NodeVector nodes_; // nodes of this block in forward order.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 BasicBlock* end_; 267 BasicBlock* end_;
259 }; 268 };
260 269
261 std::ostream& operator<<(std::ostream& os, const Schedule& s); 270 std::ostream& operator<<(std::ostream& os, const Schedule& s);
262 271
263 } // namespace compiler 272 } // namespace compiler
264 } // namespace internal 273 } // namespace internal
265 } // namespace v8 274 } // namespace v8
266 275
267 #endif // V8_COMPILER_SCHEDULE_H_ 276 #endif // V8_COMPILER_SCHEDULE_H_
OLDNEW
« no previous file with comments | « src/compiler/operator-properties-inl.h ('k') | src/compiler/schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698