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

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

Issue 10832180: Eliminate phis that do not reach any non-environment uses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder, 63 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder,
64 GrowableArray<intptr_t>* parent, 64 GrowableArray<intptr_t>* parent,
65 GrowableArray<BitVector*>* dominance_frontier); 65 GrowableArray<BitVector*>* dominance_frontier);
66 66
67 void CompressPath(intptr_t start_index, 67 void CompressPath(intptr_t start_index,
68 intptr_t current_index, 68 intptr_t current_index,
69 GrowableArray<intptr_t>* parent, 69 GrowableArray<intptr_t>* parent,
70 GrowableArray<intptr_t>* label); 70 GrowableArray<intptr_t>* label);
71 71
72 void Rename(); 72 void Rename(GrowableArray<PhiInstr*>* live_phis);
73 void RenameRecursive(BlockEntryInstr* block_entry, 73 void RenameRecursive(BlockEntryInstr* block_entry,
74 GrowableArray<Value*>* env); 74 GrowableArray<Value*>* env,
75 GrowableArray<PhiInstr*>* live_phis);
75 76
76 void InsertPhis(const GrowableArray<BlockEntryInstr*>& preorder, 77 void InsertPhis(const GrowableArray<BlockEntryInstr*>& preorder,
77 const GrowableArray<BitVector*>& assigned_vars, 78 const GrowableArray<BitVector*>& assigned_vars,
78 const GrowableArray<BitVector*>& dom_frontier); 79 const GrowableArray<BitVector*>& dom_frontier);
79 80
81 void MarkLivePhis(GrowableArray<PhiInstr*>* live_phis);
82
80 const ParsedFunction& parsed_function_; 83 const ParsedFunction& parsed_function_;
81 84
82 const intptr_t copied_parameter_count_; 85 const intptr_t copied_parameter_count_;
83 const intptr_t non_copied_parameter_count_; 86 const intptr_t non_copied_parameter_count_;
84 const intptr_t stack_local_count_; // Does not include any parameters. 87 const intptr_t stack_local_count_; // Does not include any parameters.
85 88
86 GrowableArray<BlockEntryInstr*> preorder_block_entries_; 89 GrowableArray<BlockEntryInstr*> preorder_block_entries_;
87 GrowableArray<BlockEntryInstr*> postorder_block_entries_; 90 GrowableArray<BlockEntryInstr*> postorder_block_entries_;
88 intptr_t context_level_; 91 intptr_t context_level_;
89 intptr_t last_used_try_index_; 92 intptr_t last_used_try_index_;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // Output parameters. 369 // Output parameters.
367 TargetEntryInstr** true_successor_address_; 370 TargetEntryInstr** true_successor_address_;
368 TargetEntryInstr** false_successor_address_; 371 TargetEntryInstr** false_successor_address_;
369 372
370 intptr_t condition_token_pos_; 373 intptr_t condition_token_pos_;
371 }; 374 };
372 375
373 } // namespace dart 376 } // namespace dart
374 377
375 #endif // VM_FLOW_GRAPH_BUILDER_H_ 378 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698