OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/live-range-separator.h" | 5 #include "src/compiler/live-range-separator.h" |
6 #include "src/compiler/register-allocator.h" | 6 #include "src/compiler/register-allocator.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 if (start < end) { | 39 if (start < end) { |
40 // Ensure the original range has a spill range associated, before it gets | 40 // Ensure the original range has a spill range associated, before it gets |
41 // splintered. Splinters will point to it. This way, when attempting to | 41 // splintered. Splinters will point to it. This way, when attempting to |
42 // reuse spill slots of splinters, during allocation, we avoid clobbering | 42 // reuse spill slots of splinters, during allocation, we avoid clobbering |
43 // such slots. | 43 // such slots. |
44 if (range->MayRequireSpillRange()) { | 44 if (range->MayRequireSpillRange()) { |
45 data->CreateSpillRangeForLiveRange(range); | 45 data->CreateSpillRangeForLiveRange(range); |
46 } | 46 } |
47 if (range->splinter() == nullptr) { | 47 if (range->splinter() == nullptr) { |
48 TopLevelLiveRange *splinter = data->NextLiveRange(range->machine_type()); | 48 TopLevelLiveRange *splinter = |
| 49 data->NextLiveRange(range->representation()); |
49 DCHECK_NULL(data->live_ranges()[splinter->vreg()]); | 50 DCHECK_NULL(data->live_ranges()[splinter->vreg()]); |
50 data->live_ranges()[splinter->vreg()] = splinter; | 51 data->live_ranges()[splinter->vreg()] = splinter; |
51 range->SetSplinter(splinter); | 52 range->SetSplinter(splinter); |
52 } | 53 } |
53 Zone *zone = data->allocation_zone(); | 54 Zone *zone = data->allocation_zone(); |
54 TRACE("creating splinter for range %d between %d and %d\n", range->vreg(), | 55 TRACE("creating splinter for range %d between %d and %d\n", range->vreg(), |
55 start.ToInstructionIndex(), end.ToInstructionIndex()); | 56 start.ToInstructionIndex(), end.ToInstructionIndex()); |
56 range->Splinter(start, end, zone); | 57 range->Splinter(start, end, zone); |
57 } | 58 } |
58 } | 59 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 int to_remove = range->vreg(); | 150 int to_remove = range->vreg(); |
150 splinter_parent->Merge(range, data()->allocation_zone()); | 151 splinter_parent->Merge(range, data()->allocation_zone()); |
151 data()->live_ranges()[to_remove] = nullptr; | 152 data()->live_ranges()[to_remove] = nullptr; |
152 } | 153 } |
153 } | 154 } |
154 | 155 |
155 | 156 |
156 } // namespace compiler | 157 } // namespace compiler |
157 } // namespace internal | 158 } // namespace internal |
158 } // namespace v8 | 159 } // namespace v8 |
OLD | NEW |