| 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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2427 void SpillSlotLocator::LocateSpillSlots() { | 2427 void SpillSlotLocator::LocateSpillSlots() { |
| 2428 auto code = data()->code(); | 2428 auto code = data()->code(); |
| 2429 for (auto range : data()->live_ranges()) { | 2429 for (auto range : data()->live_ranges()) { |
| 2430 if (range == nullptr || range->IsEmpty() || range->IsChild()) continue; | 2430 if (range == nullptr || range->IsEmpty() || range->IsChild()) continue; |
| 2431 // We care only about ranges which spill in the frame. | 2431 // We care only about ranges which spill in the frame. |
| 2432 if (!range->HasSpillRange()) continue; | 2432 if (!range->HasSpillRange()) continue; |
| 2433 auto spills = range->spills_at_definition(); | 2433 auto spills = range->spills_at_definition(); |
| 2434 DCHECK_NOT_NULL(spills); | 2434 DCHECK_NOT_NULL(spills); |
| 2435 for (; spills != nullptr; spills = spills->next) { | 2435 for (; spills != nullptr; spills = spills->next) { |
| 2436 code->GetInstructionBlock(spills->gap_index)->mark_needs_frame(); | 2436 code->GetInstructionBlock(spills->gap_index)->mark_needs_frame(); |
| 2437 // TODO(danno): For now, any instruction block that needs a frame forces |
| 2438 // the entire function to have a frame. |
| 2439 data()->frame()->MarkNeedsFrame(); |
| 2437 } | 2440 } |
| 2438 } | 2441 } |
| 2439 } | 2442 } |
| 2440 | 2443 |
| 2441 | 2444 |
| 2442 OperandAssigner::OperandAssigner(RegisterAllocationData* data) : data_(data) {} | 2445 OperandAssigner::OperandAssigner(RegisterAllocationData* data) : data_(data) {} |
| 2443 | 2446 |
| 2444 | 2447 |
| 2445 void OperandAssigner::AssignSpillSlots() { | 2448 void OperandAssigner::AssignSpillSlots() { |
| 2446 auto& spill_ranges = data()->spill_ranges(); | 2449 auto& spill_ranges = data()->spill_ranges(); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2884 auto eliminate = moves->PrepareInsertAfter(move); | 2887 auto eliminate = moves->PrepareInsertAfter(move); |
| 2885 to_insert.push_back(move); | 2888 to_insert.push_back(move); |
| 2886 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 2889 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
| 2887 } | 2890 } |
| 2888 } | 2891 } |
| 2889 | 2892 |
| 2890 | 2893 |
| 2891 } // namespace compiler | 2894 } // namespace compiler |
| 2892 } // namespace internal | 2895 } // namespace internal |
| 2893 } // namespace v8 | 2896 } // namespace v8 |
| OLD | NEW |