| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |