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

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

Issue 18111006: Collect edge count profiling data and reorder basic blocks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 3 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 | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_inliner.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 MaterializeObjectInstr* mat = 57 MaterializeObjectInstr* mat =
58 it.CurrentValue()->definition()->AsMaterializeObject(); 58 it.CurrentValue()->definition()->AsMaterializeObject();
59 ASSERT(mat != NULL); 59 ASSERT(mat != NULL);
60 builder->AddMaterialization(mat); 60 builder->AddMaterialization(mat);
61 } 61 }
62 } 62 }
63 } 63 }
64 64
65 65
66 FlowGraphCompiler::FlowGraphCompiler(Assembler* assembler, 66 FlowGraphCompiler::FlowGraphCompiler(Assembler* assembler,
67 const FlowGraph& flow_graph, 67 FlowGraph* flow_graph,
68 bool is_optimizing) 68 bool is_optimizing)
69 : assembler_(assembler), 69 : assembler_(assembler),
70 parsed_function_(flow_graph.parsed_function()), 70 parsed_function_(flow_graph->parsed_function()),
71 flow_graph_(flow_graph), 71 flow_graph_(*flow_graph),
72 block_order_(flow_graph.reverse_postorder()), 72 block_order_(*flow_graph->codegen_block_order(is_optimizing)),
73 current_block_(NULL), 73 current_block_(NULL),
74 exception_handlers_list_(NULL), 74 exception_handlers_list_(NULL),
75 pc_descriptors_list_(NULL), 75 pc_descriptors_list_(NULL),
76 stackmap_table_builder_( 76 stackmap_table_builder_(
77 is_optimizing ? new StackmapTableBuilder() : NULL), 77 is_optimizing ? new StackmapTableBuilder() : NULL),
78 block_info_(block_order_.length()), 78 block_info_(block_order_.length()),
79 deopt_infos_(), 79 deopt_infos_(),
80 static_calls_target_table_(GrowableObjectArray::ZoneHandle( 80 static_calls_target_table_(GrowableObjectArray::ZoneHandle(
81 GrowableObjectArray::New())), 81 GrowableObjectArray::New())),
82 is_optimizing_(is_optimizing), 82 is_optimizing_(is_optimizing),
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 for (int i = 0; i < len; i++) { 1139 for (int i = 0; i < len; i++) {
1140 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1140 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1141 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1141 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1142 ic_data.GetCountAt(i))); 1142 ic_data.GetCountAt(i)));
1143 } 1143 }
1144 sorted->Sort(HighestCountFirst); 1144 sorted->Sort(HighestCountFirst);
1145 } 1145 }
1146 1146
1147 } // namespace dart 1147 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698