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

Side by Side Diff: runtime/vm/flow_graph.h

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/compiler.cc ('k') | runtime/vm/flow_graph.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 #ifndef VM_FLOW_GRAPH_H_ 5 #ifndef VM_FLOW_GRAPH_H_
6 #define VM_FLOW_GRAPH_H_ 6 #define VM_FLOW_GRAPH_H_
7 7
8 #include "vm/growable_array.h" 8 #include "vm/growable_array.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Flow graph orders. 71 // Flow graph orders.
72 const GrowableArray<BlockEntryInstr*>& preorder() const { 72 const GrowableArray<BlockEntryInstr*>& preorder() const {
73 return preorder_; 73 return preorder_;
74 } 74 }
75 const GrowableArray<BlockEntryInstr*>& postorder() const { 75 const GrowableArray<BlockEntryInstr*>& postorder() const {
76 return postorder_; 76 return postorder_;
77 } 77 }
78 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { 78 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const {
79 return reverse_postorder_; 79 return reverse_postorder_;
80 } 80 }
81 GrowableArray<BlockEntryInstr*>* codegen_block_order(bool is_optimized) {
82 return is_optimized ? &optimized_block_order_ : &reverse_postorder_;
83 }
81 84
82 // Iterators. 85 // Iterators.
83 BlockIterator reverse_postorder_iterator() const { 86 BlockIterator reverse_postorder_iterator() const {
84 return BlockIterator(reverse_postorder()); 87 return BlockIterator(reverse_postorder());
85 } 88 }
86 BlockIterator postorder_iterator() const { 89 BlockIterator postorder_iterator() const {
87 return BlockIterator(postorder()); 90 return BlockIterator(postorder());
88 } 91 }
89 92
90 intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; } 93 intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 245
243 // Flow graph fields. 246 // Flow graph fields.
244 const ParsedFunction& parsed_function_; 247 const ParsedFunction& parsed_function_;
245 const intptr_t num_copied_params_; 248 const intptr_t num_copied_params_;
246 const intptr_t num_non_copied_params_; 249 const intptr_t num_non_copied_params_;
247 const intptr_t num_stack_locals_; 250 const intptr_t num_stack_locals_;
248 GraphEntryInstr* graph_entry_; 251 GraphEntryInstr* graph_entry_;
249 GrowableArray<BlockEntryInstr*> preorder_; 252 GrowableArray<BlockEntryInstr*> preorder_;
250 GrowableArray<BlockEntryInstr*> postorder_; 253 GrowableArray<BlockEntryInstr*> postorder_;
251 GrowableArray<BlockEntryInstr*> reverse_postorder_; 254 GrowableArray<BlockEntryInstr*> reverse_postorder_;
255 GrowableArray<BlockEntryInstr*> optimized_block_order_;
252 ConstantInstr* constant_null_; 256 ConstantInstr* constant_null_;
253 257
254 BlockEffects* block_effects_; 258 BlockEffects* block_effects_;
255 bool licm_allowed_; 259 bool licm_allowed_;
256 260
257 bool use_far_branches_; 261 bool use_far_branches_;
258 262
259 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; 263 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_;
260 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; 264 ZoneGrowableArray<BitVector*>* loop_invariant_loads_;
261 }; 265 };
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // Per block sets of available blocks. Block A is available at the block B if 360 // Per block sets of available blocks. Block A is available at the block B if
357 // and only if A dominates B and all paths from A to B are free of side 361 // and only if A dominates B and all paths from A to B are free of side
358 // effects. 362 // effects.
359 GrowableArray<BitVector*> available_at_; 363 GrowableArray<BitVector*> available_at_;
360 }; 364 };
361 365
362 366
363 } // namespace dart 367 } // namespace dart
364 368
365 #endif // VM_FLOW_GRAPH_H_ 369 #endif // VM_FLOW_GRAPH_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698