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

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

Issue 23589008: Clean up handling of guarded fields in the flow graph builder. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ZoneGrowableArray<BitVector*>* loop_invariant_loads() const { 190 ZoneGrowableArray<BitVector*>* loop_invariant_loads() const {
191 return loop_invariant_loads_; 191 return loop_invariant_loads_;
192 } 192 }
193 void set_loop_invariant_loads( 193 void set_loop_invariant_loads(
194 ZoneGrowableArray<BitVector*>* loop_invariant_loads) { 194 ZoneGrowableArray<BitVector*>* loop_invariant_loads) {
195 loop_invariant_loads_ = loop_invariant_loads; 195 loop_invariant_loads_ = loop_invariant_loads;
196 } 196 }
197 197
198 bool IsCompiledForOsr() const { return graph_entry()->IsCompiledForOsr(); } 198 bool IsCompiledForOsr() const { return graph_entry()->IsCompiledForOsr(); }
199 199
200 static void AddToGuardedFields(ZoneGrowableArray<const Field*>* array,
201 const Field* field);
202
203 ZoneGrowableArray<const Field*>* guarded_fields() const {
204 return guarded_fields_;
205 }
206
200 private: 207 private:
201 friend class IfConverter; 208 friend class IfConverter;
202 friend class BranchSimplifier; 209 friend class BranchSimplifier;
203 friend class ConstantPropagator; 210 friend class ConstantPropagator;
204 211
205 // SSA transformation methods and fields. 212 // SSA transformation methods and fields.
206 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); 213 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
207 214
208 void CompressPath( 215 void CompressPath(
209 intptr_t start_index, 216 intptr_t start_index,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 GrowableArray<BlockEntryInstr*> optimized_block_order_; 269 GrowableArray<BlockEntryInstr*> optimized_block_order_;
263 ConstantInstr* constant_null_; 270 ConstantInstr* constant_null_;
264 271
265 BlockEffects* block_effects_; 272 BlockEffects* block_effects_;
266 bool licm_allowed_; 273 bool licm_allowed_;
267 274
268 bool use_far_branches_; 275 bool use_far_branches_;
269 276
270 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; 277 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_;
271 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; 278 ZoneGrowableArray<BitVector*>* loop_invariant_loads_;
279 ZoneGrowableArray<const Field*>* guarded_fields_;
272 }; 280 };
273 281
274 282
275 class LivenessAnalysis : public ValueObject { 283 class LivenessAnalysis : public ValueObject {
276 public: 284 public:
277 LivenessAnalysis(intptr_t variable_count, 285 LivenessAnalysis(intptr_t variable_count,
278 const GrowableArray<BlockEntryInstr*>& postorder); 286 const GrowableArray<BlockEntryInstr*>& postorder);
279 287
280 void Analyze(); 288 void Analyze();
281 289
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // Per block sets of available blocks. Block A is available at the block B if 375 // Per block sets of available blocks. Block A is available at the block B if
368 // and only if A dominates B and all paths from A to B are free of side 376 // and only if A dominates B and all paths from A to B are free of side
369 // effects. 377 // effects.
370 GrowableArray<BitVector*> available_at_; 378 GrowableArray<BitVector*> available_at_;
371 }; 379 };
372 380
373 381
374 } // namespace dart 382 } // namespace dart
375 383
376 #endif // VM_FLOW_GRAPH_H_ 384 #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