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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 years, 9 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 | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/code_descriptors.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/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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 DEFINE_FLAG(bool, emit_edge_counters, true, "Emit edge counters at targets.");
15
16 static intptr_t GetEdgeCount(const Array& edge_counters, intptr_t edge_id) { 14 static intptr_t GetEdgeCount(const Array& edge_counters, intptr_t edge_id) {
17 if (!FLAG_emit_edge_counters) { 15 if (!FLAG_emit_edge_counters) {
18 // Assume everything was visited once. 16 // Assume everything was visited once.
19 return 1; 17 return 1;
20 } 18 }
21 return Smi::Value(Smi::RawCast(edge_counters.At(edge_id))); 19 return Smi::Value(Smi::RawCast(edge_counters.At(edge_id)));
22 } 20 }
23 21
24 22
25 // There is an edge from instruction->successor. Set its weight (edge count 23 // There is an edge from instruction->successor. Set its weight (edge count
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 for (intptr_t i = block_count - 1; i >= 0; --i) { 208 for (intptr_t i = block_count - 1; i >= 0; --i) {
211 if (chains[i]->first->block == flow_graph()->postorder()[i]) { 209 if (chains[i]->first->block == flow_graph()->postorder()[i]) {
212 for (Link* link = chains[i]->first; link != NULL; link = link->next) { 210 for (Link* link = chains[i]->first; link != NULL; link = link->next) {
213 flow_graph()->CodegenBlockOrder(true)->Add(link->block); 211 flow_graph()->CodegenBlockOrder(true)->Add(link->block);
214 } 212 }
215 } 213 }
216 } 214 }
217 } 215 }
218 216
219 } // namespace dart 217 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698