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

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

Issue 11638030: When replacing one value with another ensure that replacement has SSA index assigned. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 12 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 | « no previous file | runtime/vm/flow_graph_optimizer.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) 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // A simple common subexpression elimination based 161 // A simple common subexpression elimination based
162 // on the dominator tree. 162 // on the dominator tree.
163 class DominatorBasedCSE : public AllStatic { 163 class DominatorBasedCSE : public AllStatic {
164 public: 164 public:
165 // Return true, if the optimization changed the flow graph. 165 // Return true, if the optimization changed the flow graph.
166 // False, if nothing changed. 166 // False, if nothing changed.
167 static bool Optimize(FlowGraph* graph); 167 static bool Optimize(FlowGraph* graph);
168 168
169 private: 169 private:
170 static bool OptimizeRecursive( 170 static bool OptimizeRecursive(
171 FlowGraph* graph,
171 BlockEntryInstr* entry, 172 BlockEntryInstr* entry,
172 DirectChainedHashMap<PointerKeyValueTrait<Instruction> >* map); 173 DirectChainedHashMap<PointerKeyValueTrait<Instruction> >* map);
173 }; 174 };
174 175
175 176
176 // Sparse conditional constant propagation and unreachable code elimination. 177 // Sparse conditional constant propagation and unreachable code elimination.
177 // Assumes that use lists are computed and preserves them. 178 // Assumes that use lists are computed and preserves them.
178 class ConstantPropagator : public FlowGraphVisitor { 179 class ConstantPropagator : public FlowGraphVisitor {
179 public: 180 public:
180 ConstantPropagator(FlowGraph* graph, 181 ConstantPropagator(FlowGraph* graph,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 230
230 // Worklists of blocks and definitions. 231 // Worklists of blocks and definitions.
231 GrowableArray<BlockEntryInstr*> block_worklist_; 232 GrowableArray<BlockEntryInstr*> block_worklist_;
232 GrowableArray<Definition*> definition_worklist_; 233 GrowableArray<Definition*> definition_worklist_;
233 }; 234 };
234 235
235 236
236 } // namespace dart 237 } // namespace dart
237 238
238 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 239 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698