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

Side by Side Diff: runtime/vm/flow_graph_allocator.cc

Issue 10855007: Store variable counts in the flow graph builder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | runtime/vm/flow_graph_builder.h » ('j') | runtime/vm/flow_graph_builder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_allocator.h" 5 #include "vm/flow_graph_allocator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // Skip parallel moves that we insert while processing instructions. 441 // Skip parallel moves that we insert while processing instructions.
442 if (!current->IsParallelMove()) { 442 if (!current->IsParallelMove()) {
443 ProcessOneInstruction(block, current); 443 ProcessOneInstruction(block, current);
444 } 444 }
445 current = current->previous(); 445 current = current->previous();
446 } 446 }
447 447
448 ConnectIncomingPhiMoves(block); 448 ConnectIncomingPhiMoves(block);
449 } 449 }
450 450
451 const bool copied = builder_->parsed_function().copied_parameter_count() > 0; 451 const bool copied = builder_->copied_parameter_count() > 0;
452 452
453 // Process incoming parameters. 453 // Process incoming parameters.
454 const intptr_t fixed_parameters_count = 454 const intptr_t fixed_parameters_count =
455 builder_->parsed_function().function().num_fixed_parameters(); 455 builder_->parsed_function().function().num_fixed_parameters();
456 456
457 GraphEntryInstr* graph_entry = postorder_[block_count - 1]->AsGraphEntry(); 457 GraphEntryInstr* graph_entry = postorder_[block_count - 1]->AsGraphEntry();
458 for (intptr_t i = 0; i < graph_entry->start_env()->values().length(); i++) { 458 for (intptr_t i = 0; i < graph_entry->start_env()->values().length(); i++) {
459 Value* val = graph_entry->start_env()->values()[i]; 459 Value* val = graph_entry->start_env()->values()[i];
460 if (val->IsUse()) { 460 if (val->IsUse()) {
461 ParameterInstr* param = val->AsUse()->definition()->AsParameter(); 461 ParameterInstr* param = val->AsUse()->definition()->AsParameter();
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 1882 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
1883 function.ToFullyQualifiedCString()); 1883 function.ToFullyQualifiedCString());
1884 FlowGraphPrinter printer(Function::Handle(), block_order_, true); 1884 FlowGraphPrinter printer(Function::Handle(), block_order_, true);
1885 printer.PrintBlocks(); 1885 printer.PrintBlocks();
1886 OS::Print("----------------------------------------------\n"); 1886 OS::Print("----------------------------------------------\n");
1887 } 1887 }
1888 } 1888 }
1889 1889
1890 1890
1891 } // namespace dart 1891 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | runtime/vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698