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

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

Issue 651233002: Fix performance bug in scheduler. (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 | « no previous file | no next file » | 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // TODO(titzer): we place at most one floating control structure per 708 // TODO(titzer): we place at most one floating control structure per
709 // basic block because scheduling currently can interleave phis from 709 // basic block because scheduling currently can interleave phis from
710 // one subgraph with the merges from another subgraph. 710 // one subgraph with the merges from another subgraph.
711 for (size_t j = 0; j < block->NodeCount(); j++) { 711 for (size_t j = 0; j < block->NodeCount(); j++) {
712 Node* node = block->NodeAt(block->NodeCount() - 1 - j); 712 Node* node = block->NodeAt(block->NodeCount() - 1 - j);
713 SchedulerData* data = GetData(node); 713 SchedulerData* data = GetData(node);
714 if (data->is_floating_control_ && !data->is_connected_control_) { 714 if (data->is_floating_control_ && !data->is_connected_control_) {
715 Trace(" Floating control #%d:%s was scheduled in B%d\n", node->id(), 715 Trace(" Floating control #%d:%s was scheduled in B%d\n", node->id(),
716 node->op()->mnemonic(), block->id().ToInt()); 716 node->op()->mnemonic(), block->id().ToInt());
717 ConnectFloatingControlSubgraph(block, node); 717 ConnectFloatingControlSubgraph(block, node);
718 return true; 718 break;
719 } 719 }
720 } 720 }
721 } 721 }
722 722
723 return true; 723 return true;
724 } 724 }
725 725
726 726
727 void Scheduler::ConnectFloatingControlSubgraph(BasicBlock* block, Node* end) { 727 void Scheduler::ConnectFloatingControlSubgraph(BasicBlock* block, Node* end) {
728 Node* block_start = block->NodeAt(0); 728 Node* block_start = block->NodeAt(0);
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 #if DEBUG 1189 #if DEBUG
1190 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); 1190 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order);
1191 VerifySpecialRPO(num_loops, loops, final_order); 1191 VerifySpecialRPO(num_loops, loops, final_order);
1192 #endif 1192 #endif
1193 return final_order; 1193 return final_order;
1194 } 1194 }
1195 1195
1196 } // namespace compiler 1196 } // namespace compiler
1197 } // namespace internal 1197 } // namespace internal
1198 } // namespace v8 1198 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698