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

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

Issue 447793003: VM: Micro-optimization of inline array allocation code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | « no previous file | 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/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 // Returns true if every Goto in the graph is expected to have a 216 // Returns true if every Goto in the graph is expected to have a
217 // deoptimization environment and can be used as deoptimization target 217 // deoptimization environment and can be used as deoptimization target
218 // for hoisted instructions. 218 // for hoisted instructions.
219 bool is_licm_allowed() const { return licm_allowed_; } 219 bool is_licm_allowed() const { return licm_allowed_; }
220 220
221 // Stop preserving environments on Goto instructions. LICM is not allowed 221 // Stop preserving environments on Goto instructions. LICM is not allowed
222 // after this point. 222 // after this point.
223 void disallow_licm() { licm_allowed_ = false; } 223 void disallow_licm() { licm_allowed_ = false; }
224 224
225 bool use_far_branches() const { return use_far_branches_; }
226 void set_use_far_branches(bool value) {
227 use_far_branches_ = value;
228 }
229
230 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers() { 225 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers() {
231 if (loop_headers_ == NULL) { 226 if (loop_headers_ == NULL) {
232 loop_headers_ = ComputeLoops(); 227 loop_headers_ = ComputeLoops();
233 } 228 }
234 return *loop_headers_; 229 return *loop_headers_;
235 } 230 }
236 231
237 // Per loop header invariant loads sets. Each set contains load id for 232 // Per loop header invariant loads sets. Each set contains load id for
238 // those loads that are not affected by anything in the loop and can be 233 // those loads that are not affected by anything in the loop and can be
239 // hoisted out. Sets are computed by LoadOptimizer. 234 // hoisted out. Sets are computed by LoadOptimizer.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 GrowableArray<BlockEntryInstr*> preorder_; 321 GrowableArray<BlockEntryInstr*> preorder_;
327 GrowableArray<BlockEntryInstr*> postorder_; 322 GrowableArray<BlockEntryInstr*> postorder_;
328 GrowableArray<BlockEntryInstr*> reverse_postorder_; 323 GrowableArray<BlockEntryInstr*> reverse_postorder_;
329 GrowableArray<BlockEntryInstr*> optimized_block_order_; 324 GrowableArray<BlockEntryInstr*> optimized_block_order_;
330 ConstantInstr* constant_null_; 325 ConstantInstr* constant_null_;
331 ConstantInstr* constant_dead_; 326 ConstantInstr* constant_dead_;
332 327
333 BlockEffects* block_effects_; 328 BlockEffects* block_effects_;
334 bool licm_allowed_; 329 bool licm_allowed_;
335 330
336 bool use_far_branches_;
337
338 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; 331 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_;
339 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; 332 ZoneGrowableArray<BitVector*>* loop_invariant_loads_;
340 ZoneGrowableArray<const Field*>* guarded_fields_; 333 ZoneGrowableArray<const Field*>* guarded_fields_;
341 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_; 334 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_;
342 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_; 335 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_;
343 }; 336 };
344 337
345 338
346 class LivenessAnalysis : public ValueObject { 339 class LivenessAnalysis : public ValueObject {
347 public: 340 public:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // Per block sets of available blocks. Block A is available at the block B if 435 // Per block sets of available blocks. Block A is available at the block B if
443 // and only if A dominates B and all paths from A to B are free of side 436 // and only if A dominates B and all paths from A to B are free of side
444 // effects. 437 // effects.
445 GrowableArray<BitVector*> available_at_; 438 GrowableArray<BitVector*> available_at_;
446 }; 439 };
447 440
448 441
449 } // namespace dart 442 } // namespace dart
450 443
451 #endif // VM_FLOW_GRAPH_H_ 444 #endif // VM_FLOW_GRAPH_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698