Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_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 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 class AllocationFinger; | 13 class AllocationFinger; |
| 14 class BlockInfo; | 14 class BlockInfo; |
| 15 class FlowGraph; | 15 class FlowGraph; |
| 16 class LiveRange; | 16 class LiveRange; |
| 17 class UseInterval; | 17 class UseInterval; |
| 18 class UsePosition; | 18 class UsePosition; |
| 19 | 19 |
| 20 class FlowGraphAllocator : public ValueObject { | 20 class FlowGraphAllocator : public ValueObject { |
| 21 public: | 21 public: |
| 22 static const intptr_t kDoubleSpillSlotFactor = kDoubleSize / kWordSize; | |
|
Vyacheslav Egorov (Google)
2012/08/30 09:24:35
you copied the constant but not the comment.
Kevin Millikin (Google)
2012/08/30 10:02:21
I restored the comment.
| |
| 23 | |
| 22 explicit FlowGraphAllocator(const FlowGraph& flow_graph); | 24 explicit FlowGraphAllocator(const FlowGraph& flow_graph); |
| 23 | 25 |
| 24 void AllocateRegisters(); | 26 void AllocateRegisters(); |
| 25 | 27 |
| 26 // Build live-in and live-out sets for each block. | 28 // Build live-in and live-out sets for each block. |
| 27 void AnalyzeLiveness(); | 29 void AnalyzeLiveness(); |
| 28 | 30 |
| 29 // Map a virtual register number to its live range. | 31 // Map a virtual register number to its live range. |
| 30 LiveRange* GetLiveRange(intptr_t vreg); | 32 LiveRange* GetLiveRange(intptr_t vreg); |
| 31 | 33 |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 543 | 545 |
| 544 AllocationFinger finger_; | 546 AllocationFinger finger_; |
| 545 | 547 |
| 546 DISALLOW_COPY_AND_ASSIGN(LiveRange); | 548 DISALLOW_COPY_AND_ASSIGN(LiveRange); |
| 547 }; | 549 }; |
| 548 | 550 |
| 549 | 551 |
| 550 } // namespace dart | 552 } // namespace dart |
| 551 | 553 |
| 552 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ | 554 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ |
| OLD | NEW |