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

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

Issue 1410733006: More general CHA-based inlining and devirtualization for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | runtime/vm/flow_graph_compiler.cc » ('J')
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/block_scheduler.h" 5 #include "vm/block_scheduler.h"
6 6
7 #include "vm/allocation.h" 7 #include "vm/allocation.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 55
56 void BlockScheduler::AssignEdgeWeights() const { 56 void BlockScheduler::AssignEdgeWeights() const {
57 if (!FLAG_emit_edge_counters) { 57 if (!FLAG_emit_edge_counters) {
58 return; 58 return;
59 } 59 }
60 60
61 const Array& ic_data_array = Array::Handle(flow_graph()->zone(), 61 const Array& ic_data_array = Array::Handle(flow_graph()->zone(),
62 flow_graph()->parsed_function().function().ic_data_array()); 62 flow_graph()->parsed_function().function().ic_data_array());
63 if (ic_data_array.IsNull()) {
64 // Function was not compiled yet. No edge counters available.
65 return;
srdjan 2015/10/21 17:37:46 When can this happen? In precompilation FLAG_emit_
Florian Schneider 2015/10/22 13:59:25 Yes, not needed with precompilation. Left over che
66 }
63 Array& edge_counters = Array::Handle(); 67 Array& edge_counters = Array::Handle();
64 edge_counters ^= ic_data_array.At(0); 68 edge_counters ^= ic_data_array.At(0);
65 69
66 intptr_t entry_count = GetEdgeCount( 70 intptr_t entry_count = GetEdgeCount(
67 edge_counters, 71 edge_counters,
68 flow_graph()->graph_entry()->normal_entry()->preorder_number()); 72 flow_graph()->graph_entry()->normal_entry()->preorder_number());
69 flow_graph()->graph_entry()->set_entry_count(entry_count); 73 flow_graph()->graph_entry()->set_entry_count(entry_count);
70 74
71 for (BlockIterator it = flow_graph()->reverse_postorder_iterator(); 75 for (BlockIterator it = flow_graph()->reverse_postorder_iterator();
72 !it.Done(); 76 !it.Done();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 for (intptr_t i = block_count - 1; i >= 0; --i) { 208 for (intptr_t i = block_count - 1; i >= 0; --i) {
205 if (chains[i]->first->block == flow_graph()->postorder()[i]) { 209 if (chains[i]->first->block == flow_graph()->postorder()[i]) {
206 for (Link* link = chains[i]->first; link != NULL; link = link->next) { 210 for (Link* link = chains[i]->first; link != NULL; link = link->next) {
207 flow_graph()->CodegenBlockOrder(true)->Add(link->block); 211 flow_graph()->CodegenBlockOrder(true)->Add(link->block);
208 } 212 }
209 } 213 }
210 } 214 }
211 } 215 }
212 216
213 } // namespace dart 217 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | runtime/vm/flow_graph_compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698