| 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_ALLOCATOR_H_ | 5 #ifndef VM_FLOW_GRAPH_ALLOCATOR_H_ |
| 6 #define VM_FLOW_GRAPH_ALLOCATOR_H_ | 6 #define VM_FLOW_GRAPH_ALLOCATOR_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 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Build live-in and live-out sets for each block. | 47 // Build live-in and live-out sets for each block. |
| 48 void AnalyzeLiveness(); | 48 void AnalyzeLiveness(); |
| 49 | 49 |
| 50 // Map a virtual register number to its live range. | 50 // Map a virtual register number to its live range. |
| 51 LiveRange* GetLiveRange(intptr_t vreg); | 51 LiveRange* GetLiveRange(intptr_t vreg); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void CollectRepresentations(); | 54 void CollectRepresentations(); |
| 55 | 55 |
| 56 // Eliminate unnecessary environments from the IL. | 56 // Eliminate unnecessary environments from the IL. |
| 57 void EliminateEnvironmentUses(); | 57 void EliminateEnvironments(); |
| 58 | 58 |
| 59 // Compute initial values for live-out, kill and live-in sets. | 59 // Compute initial values for live-out, kill and live-in sets. |
| 60 void ComputeInitialSets(); | 60 void ComputeInitialSets(); |
| 61 | 61 |
| 62 // Update live-out set for the given block: live-out should contain | 62 // Update live-out set for the given block: live-out should contain |
| 63 // all values that are live-in for block's successors. | 63 // all values that are live-in for block's successors. |
| 64 // Returns true if live-out set was changed. | 64 // Returns true if live-out set was changed. |
| 65 bool UpdateLiveOut(const BlockEntryInstr& instr); | 65 bool UpdateLiveOut(const BlockEntryInstr& instr); |
| 66 | 66 |
| 67 // Update live-in set for the given block: live-in should contain | 67 // Update live-in set for the given block: live-in should contain |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 | 657 |
| 658 AllocationFinger finger_; | 658 AllocationFinger finger_; |
| 659 | 659 |
| 660 DISALLOW_COPY_AND_ASSIGN(LiveRange); | 660 DISALLOW_COPY_AND_ASSIGN(LiveRange); |
| 661 }; | 661 }; |
| 662 | 662 |
| 663 | 663 |
| 664 } // namespace dart | 664 } // namespace dart |
| 665 | 665 |
| 666 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ | 666 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ |
| OLD | NEW |