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

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: Created 7 years, 5 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
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 240
238 // Flow graph fields. 241 // Flow graph fields.
239 const ParsedFunction& parsed_function_; 242 const ParsedFunction& parsed_function_;
240 const intptr_t num_copied_params_; 243 const intptr_t num_copied_params_;
241 const intptr_t num_non_copied_params_; 244 const intptr_t num_non_copied_params_;
242 const intptr_t num_stack_locals_; 245 const intptr_t num_stack_locals_;
243 GraphEntryInstr* graph_entry_; 246 GraphEntryInstr* graph_entry_;
244 GrowableArray<BlockEntryInstr*> preorder_; 247 GrowableArray<BlockEntryInstr*> preorder_;
245 GrowableArray<BlockEntryInstr*> postorder_; 248 GrowableArray<BlockEntryInstr*> postorder_;
246 GrowableArray<BlockEntryInstr*> reverse_postorder_; 249 GrowableArray<BlockEntryInstr*> reverse_postorder_;
250 GrowableArray<BlockEntryInstr*> optimized_block_order_;
247 ConstantInstr* constant_null_; 251 ConstantInstr* constant_null_;
248 252
249 BlockEffects* block_effects_; 253 BlockEffects* block_effects_;
250 bool licm_allowed_; 254 bool licm_allowed_;
251 255
252 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; 256 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_;
253 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; 257 ZoneGrowableArray<BitVector*>* loop_invariant_loads_;
254 }; 258 };
255 259
256 260
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // Per block sets of available blocks. Block A is available at the block B if 353 // Per block sets of available blocks. Block A is available at the block B if
350 // and only if A dominates B and all paths from A to B are free of side 354 // and only if A dominates B and all paths from A to B are free of side
351 // effects. 355 // effects.
352 GrowableArray<BitVector*> available_at_; 356 GrowableArray<BitVector*> available_at_;
353 }; 357 };
354 358
355 359
356 } // namespace dart 360 } // namespace dart
357 361
358 #endif // VM_FLOW_GRAPH_H_ 362 #endif // VM_FLOW_GRAPH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698