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

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

Issue 12326012: Change the SSA construction pass to also construct def-use chains. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Environment* env, 117 Environment* env,
118 Definition::UseKind use_kind); 118 Definition::UseKind use_kind);
119 void InsertAfter(Instruction* prev, 119 void InsertAfter(Instruction* prev,
120 Instruction* instr, 120 Instruction* instr,
121 Environment* env, 121 Environment* env,
122 Definition::UseKind use_kind); 122 Definition::UseKind use_kind);
123 123
124 // Operations on the flow graph. 124 // Operations on the flow graph.
125 void ComputeSSA(intptr_t next_virtual_register_number, 125 void ComputeSSA(intptr_t next_virtual_register_number,
126 GrowableArray<Definition*>* inlining_parameters); 126 GrowableArray<Definition*>* inlining_parameters);
127 void ComputeUseLists();
128 127
129 // Finds natural loops in the flow graph and attaches a list of loop 128 // Finds natural loops in the flow graph and attaches a list of loop
130 // body blocks for each loop header. 129 // body blocks for each loop header.
131 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers); 130 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers);
132 131
133 void RepairGraphAfterInlining(); 132 void RepairGraphAfterInlining();
134 133
135 // TODO(zerny): Once the SSA is feature complete this should be removed. 134 // TODO(zerny): Once the SSA is feature complete this should be removed.
136 void Bailout(const char* reason) const; 135 void Bailout(const char* reason) const;
137 136
138 void InvalidateDominatorTree() { invalid_dominator_tree_ = true; } 137 void InvalidateDominatorTree() { invalid_dominator_tree_ = true; }
139 138
140 #ifdef DEBUG 139 #ifdef DEBUG
141 // Validation methods for debugging. 140 // Verification methods for debugging.
142 bool ResetUseLists();
143 bool VerifyUseLists(); 141 bool VerifyUseLists();
144 #endif // DEBUG 142 #endif // DEBUG
145 143
146 private: 144 private:
147 friend class ConstantPropagator; 145 friend class ConstantPropagator;
148 146
149 void DiscoverBlocks(); 147 void DiscoverBlocks();
150 148
151 // SSA transformation methods and fields. 149 // SSA transformation methods and fields.
152 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); 150 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 GrowableArray<BlockEntryInstr*> preorder_; 189 GrowableArray<BlockEntryInstr*> preorder_;
192 GrowableArray<BlockEntryInstr*> postorder_; 190 GrowableArray<BlockEntryInstr*> postorder_;
193 GrowableArray<BlockEntryInstr*> reverse_postorder_; 191 GrowableArray<BlockEntryInstr*> reverse_postorder_;
194 bool invalid_dominator_tree_; 192 bool invalid_dominator_tree_;
195 ConstantInstr* constant_null_; 193 ConstantInstr* constant_null_;
196 }; 194 };
197 195
198 } // namespace dart 196 } // namespace dart
199 197
200 #endif // VM_FLOW_GRAPH_H_ 198 #endif // VM_FLOW_GRAPH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698