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

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

Issue 665223006: Implement control reducer, which reduces branches and phis together in a single fixpoint. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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') | test/cctest/compiler/test-control-reducer.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 <deque> 5 #include <deque>
6 #include <queue> 6 #include <queue>
7 7
8 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
9 9
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 if (succ == NULL) { 374 if (succ == NULL) {
375 Trace("Connect #%d:%s, B%d -> end\n", node->id(), node->op()->mnemonic(), 375 Trace("Connect #%d:%s, B%d -> end\n", node->id(), node->op()->mnemonic(),
376 block->id().ToInt()); 376 block->id().ToInt());
377 } else { 377 } else {
378 Trace("Connect #%d:%s, B%d -> B%d\n", node->id(), node->op()->mnemonic(), 378 Trace("Connect #%d:%s, B%d -> B%d\n", node->id(), node->op()->mnemonic(),
379 block->id().ToInt(), succ->id().ToInt()); 379 block->id().ToInt(), succ->id().ToInt());
380 } 380 }
381 } 381 }
382 382
383 bool IsFinalMerge(Node* node) { 383 bool IsFinalMerge(Node* node) {
384 return (node == scheduler_->graph_->end()->InputAt(0)); 384 return (node->opcode() == IrOpcode::kMerge &&
385 node == scheduler_->graph_->end()->InputAt(0));
385 } 386 }
386 }; 387 };
387 388
388 389
389 void Scheduler::BuildCFG() { 390 void Scheduler::BuildCFG() {
390 Trace("--- CREATING CFG -------------------------------------------\n"); 391 Trace("--- CREATING CFG -------------------------------------------\n");
391 CFGBuilder cfg_builder(zone_, this); 392 CFGBuilder cfg_builder(zone_, this);
392 cfg_builder.Run(); 393 cfg_builder.Run();
393 // Initialize per-block data. 394 // Initialize per-block data.
394 scheduled_nodes_.resize(schedule_->BasicBlockCount(), NodeVector(zone_)); 395 scheduled_nodes_.resize(schedule_->BasicBlockCount(), NodeVector(zone_));
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 #if DEBUG 1251 #if DEBUG
1251 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); 1252 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order);
1252 VerifySpecialRPO(num_loops, loops, final_order); 1253 VerifySpecialRPO(num_loops, loops, final_order);
1253 #endif 1254 #endif
1254 return final_order; 1255 return final_order;
1255 } 1256 }
1256 1257
1257 } // namespace compiler 1258 } // namespace compiler
1258 } // namespace internal 1259 } // namespace internal
1259 } // namespace v8 1260 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/operator-properties-inl.h ('k') | test/cctest/compiler/test-control-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698