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

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

Issue 2709093003: Fixup redefinitions before doing code motion (Closed)
Patch Set: fix build Created 3 years, 9 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
« 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 RUNTIME_VM_FLOW_GRAPH_H_ 5 #ifndef RUNTIME_VM_FLOW_GRAPH_H_
6 #define RUNTIME_VM_FLOW_GRAPH_H_ 6 #define RUNTIME_VM_FLOW_GRAPH_H_
7 7
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/hash_map.h" 10 #include "vm/hash_map.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 Instruction* instr, 192 Instruction* instr,
193 Environment* env, 193 Environment* env,
194 UseKind use_kind); 194 UseKind use_kind);
195 195
196 // Operations on the flow graph. 196 // Operations on the flow graph.
197 void ComputeSSA(intptr_t next_virtual_register_number, 197 void ComputeSSA(intptr_t next_virtual_register_number,
198 ZoneGrowableArray<Definition*>* inlining_parameters); 198 ZoneGrowableArray<Definition*>* inlining_parameters);
199 199
200 // Verification methods for debugging. 200 // Verification methods for debugging.
201 bool VerifyUseLists(); 201 bool VerifyUseLists();
202 bool VerifyRedefinitions();
202 203
203 void DiscoverBlocks(); 204 void DiscoverBlocks();
204 205
205 void MergeBlocks(); 206 void MergeBlocks();
206 207
207 // Compute information about effects occuring in different blocks and 208 // Compute information about effects occuring in different blocks and
208 // discover side-effect free paths. 209 // discover side-effect free paths.
209 void ComputeBlockEffects(); 210 void ComputeBlockEffects();
210 BlockEffects* block_effects() const { return block_effects_; } 211 BlockEffects* block_effects() const { return block_effects_; }
211 212
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // shift can be a truncating Smi shift-left and result is always Smi. 285 // shift can be a truncating Smi shift-left and result is always Smi.
285 // Merge instructions (only per basic-block). 286 // Merge instructions (only per basic-block).
286 void TryOptimizePatterns(); 287 void TryOptimizePatterns();
287 288
288 // Replaces uses that are dominated by dom of 'def' with 'other'. 289 // Replaces uses that are dominated by dom of 'def' with 'other'.
289 // Note: uses that occur at instruction dom itself are not dominated by it. 290 // Note: uses that occur at instruction dom itself are not dominated by it.
290 static void RenameDominatedUses(Definition* def, 291 static void RenameDominatedUses(Definition* def,
291 Instruction* dom, 292 Instruction* dom,
292 Definition* other); 293 Definition* other);
293 294
295 // Renames uses of redefined values to make sure that uses of redefined
296 // values that are dominated by a redefinition are renamed.
297 void RenameUsesDominatedByRedefinitions();
298
294 private: 299 private:
295 friend class IfConverter; 300 friend class IfConverter;
296 friend class BranchSimplifier; 301 friend class BranchSimplifier;
297 friend class ConstantPropagator; 302 friend class ConstantPropagator;
298 friend class DeadCodeElimination; 303 friend class DeadCodeElimination;
299 304
300 // SSA transformation methods and fields. 305 // SSA transformation methods and fields.
301 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); 306 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
302 307
303 void CompressPath(intptr_t start_index, 308 void CompressPath(intptr_t start_index,
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 538
534 private: 539 private:
535 GrowableArray<Definition*> defs_; 540 GrowableArray<Definition*> defs_;
536 BitVector* contains_vector_; 541 BitVector* contains_vector_;
537 }; 542 };
538 543
539 544
540 } // namespace dart 545 } // namespace dart
541 546
542 #endif // RUNTIME_VM_FLOW_GRAPH_H_ 547 #endif // RUNTIME_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