| Index: runtime/vm/flow_graph_allocator.h
|
| diff --git a/runtime/vm/flow_graph_allocator.h b/runtime/vm/flow_graph_allocator.h
|
| index 9520390eb11175c13e2dd72bb5824832621c544b..6b785cff9ceda0411f1b65b39af99198dcb40e57 100644
|
| --- a/runtime/vm/flow_graph_allocator.h
|
| +++ b/runtime/vm/flow_graph_allocator.h
|
| @@ -76,6 +76,7 @@ class FlowGraphAllocator : public ValueObject {
|
| bool IsBlockEntry(intptr_t pos) const;
|
|
|
| LiveRange* GetLiveRange(intptr_t vreg);
|
| + LiveRange* MakeLiveRangeForTemporary();
|
|
|
| // Visit instructions in the postorder and build live ranges for
|
| // all SSA values.
|
| @@ -105,7 +106,7 @@ class FlowGraphAllocator : public ValueObject {
|
| // Add live range to the list of unallocated live ranges to be processed
|
| // by the allocator.
|
| void AddToUnallocated(LiveRange* range);
|
| -#ifdef DEBUG
|
| +#if defined(DEBUG)
|
| bool UnallocatedIsSorted();
|
| #endif
|
|
|
| @@ -140,7 +141,7 @@ class FlowGraphAllocator : public ValueObject {
|
| LiveRange* SplitBetween(LiveRange* range, intptr_t from, intptr_t to);
|
|
|
| // Find a spill slot that can be used by the given live range.
|
| - intptr_t AllocateSpillSlotFor(LiveRange* range);
|
| + void AllocateSpillSlotFor(LiveRange* range);
|
|
|
| // Allocate the given live range to a spill slot.
|
| void Spill(LiveRange* range);
|
| @@ -190,6 +191,12 @@ class FlowGraphAllocator : public ValueObject {
|
| // to ShouldBeAllocatedBefore predicate.
|
| GrowableArray<LiveRange*> unallocated_;
|
|
|
| +#if defined(DEBUG)
|
| + GrowableArray<LiveRange*> temporaries_;
|
| +#endif
|
| +
|
| + GrowableArray<LiveRange*> spilled_;
|
| +
|
| // Per register lists of allocated live ranges. Contain only those
|
| // ranges that can be affected by future allocation decisions.
|
| // Those live ranges that end before the start of the current live range are
|
| @@ -321,6 +328,7 @@ class LiveRange : public ZoneAllocated {
|
| explicit LiveRange(intptr_t vreg)
|
| : vreg_(vreg),
|
| assigned_location_(),
|
| + spill_slot_(),
|
| uses_(NULL),
|
| first_use_interval_(NULL),
|
| last_use_interval_(NULL),
|
| @@ -346,6 +354,10 @@ class LiveRange : public ZoneAllocated {
|
| assigned_location_ = location;
|
| }
|
|
|
| + void set_spill_slot(Location spill_slot) {
|
| + spill_slot_ = spill_slot;
|
| + }
|
| +
|
| void DefineAt(intptr_t pos);
|
|
|
| void AddUse(intptr_t pos, Location* location_slot);
|
| @@ -361,6 +373,10 @@ class LiveRange : public ZoneAllocated {
|
| return (Start() <= pos) && (pos < End());
|
| }
|
|
|
| + Location spill_slot() const {
|
| + return spill_slot_;
|
| + }
|
| +
|
| private:
|
| LiveRange(intptr_t vreg,
|
| UsePosition* uses,
|
| @@ -378,6 +394,7 @@ class LiveRange : public ZoneAllocated {
|
|
|
| const intptr_t vreg_;
|
| Location assigned_location_;
|
| + Location spill_slot_;
|
|
|
| UsePosition* uses_;
|
| UseInterval* first_use_interval_;
|
|
|