OLD | NEW |
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/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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the | 308 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the |
309 // shift can be a truncating Smi shift-left and result is always Smi. | 309 // shift can be a truncating Smi shift-left and result is always Smi. |
310 // Merge instructions (only per basic-block). | 310 // Merge instructions (only per basic-block). |
311 void TryOptimizePatterns(); | 311 void TryOptimizePatterns(); |
312 | 312 |
313 private: | 313 private: |
314 friend class IfConverter; | 314 friend class IfConverter; |
315 friend class BranchSimplifier; | 315 friend class BranchSimplifier; |
316 friend class ConstantPropagator; | 316 friend class ConstantPropagator; |
317 friend class DeadCodeElimination; | 317 friend class DeadCodeElimination; |
| 318 friend class AotOptimizer; |
318 | 319 |
319 // SSA transformation methods and fields. | 320 // SSA transformation methods and fields. |
320 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); | 321 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); |
321 | 322 |
322 void CompressPath( | 323 void CompressPath( |
323 intptr_t start_index, | 324 intptr_t start_index, |
324 intptr_t current_index, | 325 intptr_t current_index, |
325 GrowableArray<intptr_t>* parent, | 326 GrowableArray<intptr_t>* parent, |
326 GrowableArray<intptr_t>* label); | 327 GrowableArray<intptr_t>* label); |
327 | 328 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 | 561 |
561 private: | 562 private: |
562 GrowableArray<Definition*> defs_; | 563 GrowableArray<Definition*> defs_; |
563 BitVector* contains_vector_; | 564 BitVector* contains_vector_; |
564 }; | 565 }; |
565 | 566 |
566 | 567 |
567 } // namespace dart | 568 } // namespace dart |
568 | 569 |
569 #endif // VM_FLOW_GRAPH_H_ | 570 #endif // VM_FLOW_GRAPH_H_ |
OLD | NEW |