OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 return ret; | 2385 return ret; |
2386 } | 2386 } |
2387 | 2387 |
2388 | 2388 |
2389 void RegisterAllocator::SplitAndSpillRangesDefinedByMemoryOperand( | 2389 void RegisterAllocator::SplitAndSpillRangesDefinedByMemoryOperand( |
2390 bool operands_only) { | 2390 bool operands_only) { |
2391 size_t initial_range_count = data()->live_ranges().size(); | 2391 size_t initial_range_count = data()->live_ranges().size(); |
2392 for (size_t i = 0; i < initial_range_count; ++i) { | 2392 for (size_t i = 0; i < initial_range_count; ++i) { |
2393 TopLevelLiveRange* range = data()->live_ranges()[i]; | 2393 TopLevelLiveRange* range = data()->live_ranges()[i]; |
2394 if (!CanProcessRange(range)) continue; | 2394 if (!CanProcessRange(range)) continue; |
2395 if (range->HasNoSpillType() || (operands_only && range->HasSpillRange())) { | 2395 if (!range->HasSpillOperand()) continue; |
2396 continue; | |
2397 } | |
2398 | 2396 |
2399 LifetimePosition start = range->Start(); | 2397 LifetimePosition start = range->Start(); |
2400 TRACE("Live range %d:%d is defined by a spill operand.\n", | 2398 TRACE("Live range %d:%d is defined by a spill operand.\n", |
2401 range->TopLevel()->vreg(), range->relative_id()); | 2399 range->TopLevel()->vreg(), range->relative_id()); |
2402 LifetimePosition next_pos = start; | 2400 LifetimePosition next_pos = start; |
2403 if (next_pos.IsGapPosition()) { | 2401 if (next_pos.IsGapPosition()) { |
2404 next_pos = next_pos.NextStart(); | 2402 next_pos = next_pos.NextStart(); |
2405 } | 2403 } |
2406 UsePosition* pos = range->NextUsePositionRegisterIsBeneficial(next_pos); | 2404 UsePosition* pos = range->NextUsePositionRegisterIsBeneficial(next_pos); |
2407 // If the range already has a spill operand and it doesn't need a | 2405 // If the range already has a spill operand and it doesn't need a |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3623 } | 3621 } |
3624 } | 3622 } |
3625 } | 3623 } |
3626 } | 3624 } |
3627 } | 3625 } |
3628 | 3626 |
3629 | 3627 |
3630 } // namespace compiler | 3628 } // namespace compiler |
3631 } // namespace internal | 3629 } // namespace internal |
3632 } // namespace v8 | 3630 } // namespace v8 |
OLD | NEW |