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

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

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/schedule.h ('k') | src/compiler/scheduler.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 #include "src/compiler/node.h" 5 #include "src/compiler/node.h"
6 #include "src/compiler/node-properties.h" 6 #include "src/compiler/node-properties.h"
7 #include "src/compiler/node-properties-inl.h" 7 #include "src/compiler/node-properties-inl.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 BasicBlock::BasicBlock(Zone* zone, Id id) 15 BasicBlock::BasicBlock(Zone* zone, Id id)
16 : rpo_number_(-1), 16 : ao_number_(-1),
17 rpo_number_(-1),
18 deferred_(false),
17 dominator_(NULL), 19 dominator_(NULL),
18 loop_header_(NULL), 20 loop_header_(NULL),
19 loop_depth_(0), 21 loop_depth_(0),
20 loop_end_(-1), 22 loop_end_(-1),
21 control_(kNone), 23 control_(kNone),
22 control_input_(NULL), 24 control_input_(NULL),
23 nodes_(zone), 25 nodes_(zone),
24 successors_(zone), 26 successors_(zone),
25 predecessors_(zone), 27 predecessors_(zone),
26 id_(id) {} 28 id_(id) {}
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 nodeid_to_block_[node->id()] = block; 235 nodeid_to_block_[node->id()] = block;
234 } 236 }
235 237
236 238
237 std::ostream& operator<<(std::ostream& os, const Schedule& s) { 239 std::ostream& operator<<(std::ostream& os, const Schedule& s) {
238 // TODO(svenpanne) Const-correct the RPO stuff/iterators. 240 // TODO(svenpanne) Const-correct the RPO stuff/iterators.
239 BasicBlockVector* rpo = const_cast<Schedule*>(&s)->rpo_order(); 241 BasicBlockVector* rpo = const_cast<Schedule*>(&s)->rpo_order();
240 for (BasicBlockVectorIter i = rpo->begin(); i != rpo->end(); ++i) { 242 for (BasicBlockVectorIter i = rpo->begin(); i != rpo->end(); ++i) {
241 BasicBlock* block = *i; 243 BasicBlock* block = *i;
242 os << "--- BLOCK B" << block->id(); 244 os << "--- BLOCK B" << block->id();
245 if (block->deferred()) os << " (deferred)";
243 if (block->PredecessorCount() != 0) os << " <- "; 246 if (block->PredecessorCount() != 0) os << " <- ";
244 bool comma = false; 247 bool comma = false;
245 for (BasicBlock::Predecessors::iterator j = block->predecessors_begin(); 248 for (BasicBlock::Predecessors::iterator j = block->predecessors_begin();
246 j != block->predecessors_end(); ++j) { 249 j != block->predecessors_end(); ++j) {
247 if (comma) os << ", "; 250 if (comma) os << ", ";
248 comma = true; 251 comma = true;
249 os << "B" << (*j)->id(); 252 os << "B" << (*j)->id();
250 } 253 }
251 os << " ---\n"; 254 os << " ---\n";
252 for (BasicBlock::const_iterator j = block->begin(); j != block->end(); 255 for (BasicBlock::const_iterator j = block->begin(); j != block->end();
(...skipping 29 matching lines...) Expand all
282 } 285 }
283 os << "\n"; 286 os << "\n";
284 } 287 }
285 } 288 }
286 return os; 289 return os;
287 } 290 }
288 291
289 } // namespace compiler 292 } // namespace compiler
290 } // namespace internal 293 } // namespace internal
291 } // namespace v8 294 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698