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

Side by Side Diff: src/compiler/graph-builder.h

Issue 809333002: [turbofan] Implement OSR for outer loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/graph-builder.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_GRAPH_BUILDER_H_ 5 #ifndef V8_COMPILER_GRAPH_BUILDER_H_
6 #define V8_COMPILER_GRAPH_BUILDER_H_ 6 #define V8_COMPILER_GRAPH_BUILDER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 Environment* CopyForConditional() { return builder()->CopyEnvironment(this); } 212 Environment* CopyForConditional() { return builder()->CopyEnvironment(this); }
213 213
214 // Copies this environment to a potentially unreachable control-flow point. 214 // Copies this environment to a potentially unreachable control-flow point.
215 Environment* CopyAsUnreachable() { 215 Environment* CopyAsUnreachable() {
216 Environment* env = builder()->CopyEnvironment(this); 216 Environment* env = builder()->CopyEnvironment(this);
217 env->MarkAsUnreachable(); 217 env->MarkAsUnreachable();
218 return env; 218 return env;
219 } 219 }
220 220
221 // Copies this environment at a loop header control-flow point. 221 // Copies this environment at a loop header control-flow point.
222 Environment* CopyForLoop(BitVector* assigned) { 222 Environment* CopyForLoop(BitVector* assigned, bool is_osr = false) {
223 PrepareForLoop(assigned); 223 PrepareForLoop(assigned, is_osr);
224 return builder()->CopyEnvironment(this); 224 return builder()->CopyEnvironment(this);
225 } 225 }
226 226
227 Node* GetContext() { return builder_->current_context(); } 227 Node* GetContext() { return builder_->current_context(); }
228 228
229 protected: 229 protected:
230 Zone* zone() const { return builder_->local_zone(); } 230 Zone* zone() const { return builder_->local_zone(); }
231 Graph* graph() const { return builder_->graph(); } 231 Graph* graph() const { return builder_->graph(); }
232 StructuredGraphBuilder* builder() const { return builder_; } 232 StructuredGraphBuilder* builder() const { return builder_; }
233 CommonOperatorBuilder* common() { return builder_->common(); } 233 CommonOperatorBuilder* common() { return builder_->common(); }
234 NodeVector* values() { return &values_; } 234 NodeVector* values() { return &values_; }
235 235
236 // Prepare environment to be used as loop header. 236 // Prepare environment to be used as loop header.
237 void PrepareForLoop(BitVector* assigned); 237 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
238 238
239 private: 239 private:
240 StructuredGraphBuilder* builder_; 240 StructuredGraphBuilder* builder_;
241 Node* control_dependency_; 241 Node* control_dependency_;
242 Node* effect_dependency_; 242 Node* effect_dependency_;
243 NodeVector values_; 243 NodeVector values_;
244 }; 244 };
245 } 245 }
246 } 246 }
247 } // namespace v8::internal::compiler 247 } // namespace v8::internal::compiler
248 248
249 #endif // V8_COMPILER_GRAPH_BUILDER_H__ 249 #endif // V8_COMPILER_GRAPH_BUILDER_H__
OLDNEW
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698