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

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

Issue 11824024: Constant propagator should revisit phis when it visits predecessor block. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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_OPTIMIZER_H_ 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool IsUnknown(const Object& value) { 205 bool IsUnknown(const Object& value) {
206 return value.raw() == unknown_.raw(); 206 return value.raw() == unknown_.raw();
207 } 207 }
208 bool IsNonConstant(const Object& value) { 208 bool IsNonConstant(const Object& value) {
209 return value.raw() == non_constant_.raw(); 209 return value.raw() == non_constant_.raw();
210 } 210 }
211 bool IsConstant(const Object& value) { 211 bool IsConstant(const Object& value) {
212 return !IsNonConstant(value) && !IsUnknown(value); 212 return !IsNonConstant(value) && !IsUnknown(value);
213 } 213 }
214 214
215 void VisitSuccessorPhis(BlockEntryInstr* block);
216
215 virtual void VisitBlocks() { UNREACHABLE(); } 217 virtual void VisitBlocks() { UNREACHABLE(); }
216 218
217 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr); 219 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr);
218 FOR_EACH_INSTRUCTION(DECLARE_VISIT) 220 FOR_EACH_INSTRUCTION(DECLARE_VISIT)
219 #undef DECLARE_VISIT 221 #undef DECLARE_VISIT
220 222
221 FlowGraph* graph_; 223 FlowGraph* graph_;
222 224
223 // Sentinels for unknown constant and non-constant values. 225 // Sentinels for unknown constant and non-constant values.
224 const Object& unknown_; 226 const Object& unknown_;
(...skipping 10 matching lines...) Expand all
235 237
236 // Worklists of blocks and definitions. 238 // Worklists of blocks and definitions.
237 GrowableArray<BlockEntryInstr*> block_worklist_; 239 GrowableArray<BlockEntryInstr*> block_worklist_;
238 GrowableArray<Definition*> definition_worklist_; 240 GrowableArray<Definition*> definition_worklist_;
239 }; 241 };
240 242
241 243
242 } // namespace dart 244 } // namespace dart
243 245
244 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 246 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698