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

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

Issue 14740005: Initial support for polymorphic inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 7 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void set_current_ssa_temp_index(intptr_t index) { 91 void set_current_ssa_temp_index(intptr_t index) {
92 current_ssa_temp_index_ = index; 92 current_ssa_temp_index_ = index;
93 } 93 }
94 94
95 intptr_t max_virtual_register_number() const { 95 intptr_t max_virtual_register_number() const {
96 return current_ssa_temp_index(); 96 return current_ssa_temp_index();
97 } 97 }
98 98
99 intptr_t max_block_id() const { return max_block_id_; } 99 intptr_t max_block_id() const { return max_block_id_; }
100 void set_max_block_id(intptr_t id) { max_block_id_ = id; } 100 void set_max_block_id(intptr_t id) { max_block_id_ = id; }
101 intptr_t allocate_block_id() { return ++max_block_id_; }
101 102
102 GraphEntryInstr* graph_entry() const { 103 GraphEntryInstr* graph_entry() const {
103 return graph_entry_; 104 return graph_entry_;
104 } 105 }
105 106
106 ConstantInstr* constant_null() const { 107 ConstantInstr* constant_null() const {
107 return constant_null_; 108 return constant_null_;
108 } 109 }
109 110
110 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } 111 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; }
(...skipping 28 matching lines...) Expand all
139 bool VerifyUseLists(); 140 bool VerifyUseLists();
140 #endif // DEBUG 141 #endif // DEBUG
141 142
142 void DiscoverBlocks(); 143 void DiscoverBlocks();
143 144
144 // Compute information about effects occuring in different blocks and 145 // Compute information about effects occuring in different blocks and
145 // discover side-effect free paths. 146 // discover side-effect free paths.
146 void ComputeBlockEffects(); 147 void ComputeBlockEffects();
147 BlockEffects* block_effects() const { return block_effects_; } 148 BlockEffects* block_effects() const { return block_effects_; }
148 149
150 // Remove the redefinition instructions inserted to inhibit code motion.
151 void RemoveRedefinitions();
152
149 private: 153 private:
150 friend class IfConverter; 154 friend class IfConverter;
151 friend class BranchSimplifier; 155 friend class BranchSimplifier;
152 friend class ConstantPropagator; 156 friend class ConstantPropagator;
153 157
154 // SSA transformation methods and fields. 158 // SSA transformation methods and fields.
155 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); 159 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
156 160
157 void CompressPath( 161 void CompressPath(
158 intptr_t start_index, 162 intptr_t start_index,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // Per block sets of available blocks. Block A is available at the block B if 303 // Per block sets of available blocks. Block A is available at the block B if
300 // and only if A dominates B and all paths from A to B are free of side 304 // and only if A dominates B and all paths from A to B are free of side
301 // effects. 305 // effects.
302 GrowableArray<BitVector*> available_at_; 306 GrowableArray<BitVector*> available_at_;
303 }; 307 };
304 308
305 309
306 } // namespace dart 310 } // namespace dart
307 311
308 #endif // VM_FLOW_GRAPH_H_ 312 #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