OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 LOperand* op = NULL; | 231 LOperand* op = NULL; |
232 if (HasRegisterAssigned()) { | 232 if (HasRegisterAssigned()) { |
233 ASSERT(!IsSpilled()); | 233 ASSERT(!IsSpilled()); |
234 switch (Kind()) { | 234 switch (Kind()) { |
235 case GENERAL_REGISTERS: | 235 case GENERAL_REGISTERS: |
236 op = LRegister::Create(assigned_register(), zone); | 236 op = LRegister::Create(assigned_register(), zone); |
237 break; | 237 break; |
238 case DOUBLE_REGISTERS: | 238 case DOUBLE_REGISTERS: |
239 op = LDoubleRegister::Create(assigned_register(), zone); | 239 op = LDoubleRegister::Create(assigned_register(), zone); |
240 break; | 240 break; |
| 241 case FLOAT32x4_REGISTERS: |
| 242 op = LFloat32x4Register::Create(assigned_register(), zone); |
| 243 break; |
| 244 case INT32x4_REGISTERS: |
| 245 op = LInt32x4Register::Create(assigned_register(), zone); |
| 246 break; |
241 default: | 247 default: |
242 UNREACHABLE(); | 248 UNREACHABLE(); |
243 } | 249 } |
244 } else if (IsSpilled()) { | 250 } else if (IsSpilled()) { |
245 ASSERT(!HasRegisterAssigned()); | 251 ASSERT(!HasRegisterAssigned()); |
246 op = TopLevel()->GetSpillOperand(); | 252 op = TopLevel()->GetSpillOperand(); |
247 ASSERT(!op->IsUnallocated()); | 253 ASSERT(!op->IsUnallocated()); |
248 } else { | 254 } else { |
249 LUnallocated* unalloc = new(zone) LUnallocated(LUnallocated::NONE); | 255 LUnallocated* unalloc = new(zone) LUnallocated(LUnallocated::NONE); |
250 unalloc->set_virtual_register(id_); | 256 unalloc->set_virtual_register(id_); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 487 |
482 void LiveRange::ConvertOperands(Zone* zone) { | 488 void LiveRange::ConvertOperands(Zone* zone) { |
483 LOperand* op = CreateAssignedOperand(zone); | 489 LOperand* op = CreateAssignedOperand(zone); |
484 UsePosition* use_pos = first_pos(); | 490 UsePosition* use_pos = first_pos(); |
485 while (use_pos != NULL) { | 491 while (use_pos != NULL) { |
486 ASSERT(Start().Value() <= use_pos->pos().Value() && | 492 ASSERT(Start().Value() <= use_pos->pos().Value() && |
487 use_pos->pos().Value() <= End().Value()); | 493 use_pos->pos().Value() <= End().Value()); |
488 | 494 |
489 if (use_pos->HasOperand()) { | 495 if (use_pos->HasOperand()) { |
490 ASSERT(op->IsRegister() || op->IsDoubleRegister() || | 496 ASSERT(op->IsRegister() || op->IsDoubleRegister() || |
| 497 op->IsFloat32x4Register() || op->IsInt32x4Register() || |
491 !use_pos->RequiresRegister()); | 498 !use_pos->RequiresRegister()); |
492 use_pos->operand()->ConvertTo(op->kind(), op->index()); | 499 use_pos->operand()->ConvertTo(op->kind(), op->index()); |
493 } | 500 } |
494 use_pos = use_pos->next(); | 501 use_pos = use_pos->next(); |
495 } | 502 } |
496 } | 503 } |
497 | 504 |
498 | 505 |
499 bool LiveRange::CanCover(LifetimePosition position) const { | 506 bool LiveRange::CanCover(LifetimePosition position) const { |
500 if (IsEmpty()) return false; | 507 if (IsEmpty()) return false; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 : zone_(graph->isolate()), | 554 : zone_(graph->isolate()), |
548 chunk_(NULL), | 555 chunk_(NULL), |
549 live_in_sets_(graph->blocks()->length(), zone()), | 556 live_in_sets_(graph->blocks()->length(), zone()), |
550 live_ranges_(num_values * 2, zone()), | 557 live_ranges_(num_values * 2, zone()), |
551 fixed_live_ranges_(NULL), | 558 fixed_live_ranges_(NULL), |
552 fixed_double_live_ranges_(NULL), | 559 fixed_double_live_ranges_(NULL), |
553 unhandled_live_ranges_(num_values * 2, zone()), | 560 unhandled_live_ranges_(num_values * 2, zone()), |
554 active_live_ranges_(8, zone()), | 561 active_live_ranges_(8, zone()), |
555 inactive_live_ranges_(8, zone()), | 562 inactive_live_ranges_(8, zone()), |
556 reusable_slots_(8, zone()), | 563 reusable_slots_(8, zone()), |
| 564 reusable_xmm_slots_(8, zone()), |
557 next_virtual_register_(num_values), | 565 next_virtual_register_(num_values), |
558 first_artificial_register_(num_values), | 566 first_artificial_register_(num_values), |
559 mode_(UNALLOCATED_REGISTERS), | 567 mode_(UNALLOCATED_REGISTERS), |
560 num_registers_(-1), | 568 num_registers_(-1), |
561 graph_(graph), | 569 graph_(graph), |
562 has_osr_entry_(false), | 570 has_osr_entry_(false), |
563 allocation_ok_(true) { } | 571 allocation_ok_(true) { } |
564 | 572 |
565 | 573 |
566 void LAllocator::InitializeLivenessAnalysis() { | 574 void LAllocator::InitializeLivenessAnalysis() { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 chunk()->zone()); | 874 chunk()->zone()); |
867 int vreg = GetVirtualRegister(); | 875 int vreg = GetVirtualRegister(); |
868 if (!AllocationOk()) return; | 876 if (!AllocationOk()) return; |
869 cur_input->set_virtual_register(vreg); | 877 cur_input->set_virtual_register(vreg); |
870 | 878 |
871 if (RequiredRegisterKind(input_copy->virtual_register()) == | 879 if (RequiredRegisterKind(input_copy->virtual_register()) == |
872 DOUBLE_REGISTERS) { | 880 DOUBLE_REGISTERS) { |
873 double_artificial_registers_.Add( | 881 double_artificial_registers_.Add( |
874 cur_input->virtual_register() - first_artificial_register_, | 882 cur_input->virtual_register() - first_artificial_register_, |
875 zone()); | 883 zone()); |
| 884 } else if (RequiredRegisterKind(input_copy->virtual_register()) == |
| 885 FLOAT32x4_REGISTERS) { |
| 886 float32x4_artificial_registers_.Add( |
| 887 cur_input->virtual_register() - first_artificial_register_, |
| 888 zone()); |
| 889 } else if (RequiredRegisterKind(input_copy->virtual_register()) == |
| 890 INT32x4_REGISTERS) { |
| 891 int32x4_artificial_registers_.Add( |
| 892 cur_input->virtual_register() - first_artificial_register_, |
| 893 zone()); |
876 } | 894 } |
877 | 895 |
878 AddConstraintsGapMove(gap_index, input_copy, cur_input); | 896 AddConstraintsGapMove(gap_index, input_copy, cur_input); |
879 } | 897 } |
880 } | 898 } |
881 } | 899 } |
882 | 900 |
883 // Handle "output same as input" for second instruction. | 901 // Handle "output same as input" for second instruction. |
884 if (second != NULL && second->Output() != NULL) { | 902 if (second != NULL && second->Output() != NULL) { |
885 LUnallocated* second_output = LUnallocated::cast(second->Output()); | 903 LUnallocated* second_output = LUnallocated::cast(second->Output()); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 // can potentially cause a GC so they have a pointer map. | 1196 // can potentially cause a GC so they have a pointer map. |
1179 // By inserting a move we essentially create a copy of a | 1197 // By inserting a move we essentially create a copy of a |
1180 // value which is invisible to PopulatePointerMaps(), because we store | 1198 // value which is invisible to PopulatePointerMaps(), because we store |
1181 // it into a location different from the operand of a live range | 1199 // it into a location different from the operand of a live range |
1182 // covering a branch instruction. | 1200 // covering a branch instruction. |
1183 // Thus we need to manually record a pointer. | 1201 // Thus we need to manually record a pointer. |
1184 LInstruction* branch = InstructionAt(pred->last_instruction_index()); | 1202 LInstruction* branch = InstructionAt(pred->last_instruction_index()); |
1185 if (branch->HasPointerMap()) { | 1203 if (branch->HasPointerMap()) { |
1186 if (HasTaggedValue(range->id())) { | 1204 if (HasTaggedValue(range->id())) { |
1187 branch->pointer_map()->RecordPointer(cur_op, chunk()->zone()); | 1205 branch->pointer_map()->RecordPointer(cur_op, chunk()->zone()); |
1188 } else if (!cur_op->IsDoubleStackSlot() && | 1206 } else if (!cur_op->IsDoubleStackSlot() && |
1189 !cur_op->IsDoubleRegister()) { | 1207 !cur_op->IsDoubleRegister() && |
| 1208 !cur_op->IsFloat32x4StackSlot() && |
| 1209 !cur_op->IsFloat32x4Register() && |
| 1210 !cur_op->IsInt32x4StackSlot() && |
| 1211 !cur_op->IsInt32x4Register()) { |
1190 branch->pointer_map()->RemovePointer(cur_op); | 1212 branch->pointer_map()->RemovePointer(cur_op); |
1191 } | 1213 } |
1192 } | 1214 } |
1193 } | 1215 } |
1194 gap->GetOrCreateParallelMove( | 1216 gap->GetOrCreateParallelMove( |
1195 LGap::START, chunk()->zone())->AddMove(pred_op, cur_op, | 1217 LGap::START, chunk()->zone())->AddMove(pred_op, cur_op, |
1196 chunk()->zone()); | 1218 chunk()->zone()); |
1197 } | 1219 } |
1198 } | 1220 } |
1199 } | 1221 } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 } | 1527 } |
1506 | 1528 |
1507 | 1529 |
1508 void LAllocator::AllocateRegisters() { | 1530 void LAllocator::AllocateRegisters() { |
1509 ASSERT(unhandled_live_ranges_.is_empty()); | 1531 ASSERT(unhandled_live_ranges_.is_empty()); |
1510 | 1532 |
1511 for (int i = 0; i < live_ranges_.length(); ++i) { | 1533 for (int i = 0; i < live_ranges_.length(); ++i) { |
1512 if (live_ranges_[i] != NULL) { | 1534 if (live_ranges_[i] != NULL) { |
1513 if (live_ranges_[i]->Kind() == mode_) { | 1535 if (live_ranges_[i]->Kind() == mode_) { |
1514 AddToUnhandledUnsorted(live_ranges_[i]); | 1536 AddToUnhandledUnsorted(live_ranges_[i]); |
| 1537 } else if (mode_ == DOUBLE_REGISTERS && |
| 1538 (live_ranges_[i]->Kind() == FLOAT32x4_REGISTERS || |
| 1539 live_ranges_[i]->Kind() == INT32x4_REGISTERS)) { |
| 1540 AddToUnhandledUnsorted(live_ranges_[i]); |
1515 } | 1541 } |
1516 } | 1542 } |
1517 } | 1543 } |
1518 SortUnhandled(); | 1544 SortUnhandled(); |
1519 ASSERT(UnhandledIsSorted()); | 1545 ASSERT(UnhandledIsSorted()); |
1520 | 1546 |
1521 ASSERT(reusable_slots_.is_empty()); | 1547 ASSERT(reusable_slots_.is_empty()); |
| 1548 ASSERT(reusable_xmm_slots_.is_empty()); |
1522 ASSERT(active_live_ranges_.is_empty()); | 1549 ASSERT(active_live_ranges_.is_empty()); |
1523 ASSERT(inactive_live_ranges_.is_empty()); | 1550 ASSERT(inactive_live_ranges_.is_empty()); |
1524 | 1551 |
1525 if (mode_ == DOUBLE_REGISTERS) { | 1552 if (mode_ == DOUBLE_REGISTERS) { |
1526 for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) { | 1553 for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) { |
1527 LiveRange* current = fixed_double_live_ranges_.at(i); | 1554 LiveRange* current = fixed_double_live_ranges_.at(i); |
1528 if (current != NULL) { | 1555 if (current != NULL) { |
1529 AddToInactive(current); | 1556 AddToInactive(current); |
1530 } | 1557 } |
1531 } | 1558 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 | 1630 |
1604 if (!result) AllocateBlockedReg(current); | 1631 if (!result) AllocateBlockedReg(current); |
1605 if (!AllocationOk()) return; | 1632 if (!AllocationOk()) return; |
1606 | 1633 |
1607 if (current->HasRegisterAssigned()) { | 1634 if (current->HasRegisterAssigned()) { |
1608 AddToActive(current); | 1635 AddToActive(current); |
1609 } | 1636 } |
1610 } | 1637 } |
1611 | 1638 |
1612 reusable_slots_.Rewind(0); | 1639 reusable_slots_.Rewind(0); |
| 1640 reusable_xmm_slots_.Rewind(0); |
1613 active_live_ranges_.Rewind(0); | 1641 active_live_ranges_.Rewind(0); |
1614 inactive_live_ranges_.Rewind(0); | 1642 inactive_live_ranges_.Rewind(0); |
1615 } | 1643 } |
1616 | 1644 |
1617 | 1645 |
1618 const char* LAllocator::RegisterName(int allocation_index) { | 1646 const char* LAllocator::RegisterName(int allocation_index) { |
1619 if (mode_ == GENERAL_REGISTERS) { | 1647 if (mode_ == GENERAL_REGISTERS) { |
1620 return Register::AllocationIndexToString(allocation_index); | 1648 return Register::AllocationIndexToString(allocation_index); |
1621 } else { | 1649 } else { |
1622 return DoubleRegister::AllocationIndexToString(allocation_index); | 1650 return DoubleRegister::AllocationIndexToString(allocation_index); |
(...skipping 16 matching lines...) Expand all Loading... |
1639 if (value == NULL) return false; | 1667 if (value == NULL) return false; |
1640 return value->representation().IsTagged() && !value->type().IsSmi(); | 1668 return value->representation().IsTagged() && !value->type().IsSmi(); |
1641 } | 1669 } |
1642 | 1670 |
1643 | 1671 |
1644 RegisterKind LAllocator::RequiredRegisterKind(int virtual_register) const { | 1672 RegisterKind LAllocator::RequiredRegisterKind(int virtual_register) const { |
1645 if (virtual_register < first_artificial_register_) { | 1673 if (virtual_register < first_artificial_register_) { |
1646 HValue* value = graph_->LookupValue(virtual_register); | 1674 HValue* value = graph_->LookupValue(virtual_register); |
1647 if (value != NULL && value->representation().IsDouble()) { | 1675 if (value != NULL && value->representation().IsDouble()) { |
1648 return DOUBLE_REGISTERS; | 1676 return DOUBLE_REGISTERS; |
| 1677 } else if (value != NULL && (value->representation().IsFloat32x4())) { |
| 1678 return FLOAT32x4_REGISTERS; |
| 1679 } else if (value != NULL && (value->representation().IsInt32x4())) { |
| 1680 return INT32x4_REGISTERS; |
1649 } | 1681 } |
1650 } else if (double_artificial_registers_.Contains( | 1682 } else if (double_artificial_registers_.Contains( |
1651 virtual_register - first_artificial_register_)) { | 1683 virtual_register - first_artificial_register_)) { |
1652 return DOUBLE_REGISTERS; | 1684 return DOUBLE_REGISTERS; |
| 1685 } else if (float32x4_artificial_registers_.Contains( |
| 1686 virtual_register - first_artificial_register_)) { |
| 1687 return FLOAT32x4_REGISTERS; |
| 1688 } else if (int32x4_artificial_registers_.Contains( |
| 1689 virtual_register - first_artificial_register_)) { |
| 1690 return INT32x4_REGISTERS; |
1653 } | 1691 } |
1654 | 1692 |
1655 return GENERAL_REGISTERS; | 1693 return GENERAL_REGISTERS; |
1656 } | 1694 } |
1657 | 1695 |
1658 | 1696 |
1659 void LAllocator::AddToActive(LiveRange* range) { | 1697 void LAllocator::AddToActive(LiveRange* range) { |
1660 TraceAlloc("Add live range %d to active\n", range->id()); | 1698 TraceAlloc("Add live range %d to active\n", range->id()); |
1661 active_live_ranges_.Add(range, zone()); | 1699 active_live_ranges_.Add(range, zone()); |
1662 } | 1700 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 | 1763 |
1726 | 1764 |
1727 void LAllocator::FreeSpillSlot(LiveRange* range) { | 1765 void LAllocator::FreeSpillSlot(LiveRange* range) { |
1728 // Check that we are the last range. | 1766 // Check that we are the last range. |
1729 if (range->next() != NULL) return; | 1767 if (range->next() != NULL) return; |
1730 | 1768 |
1731 if (!range->TopLevel()->HasAllocatedSpillOperand()) return; | 1769 if (!range->TopLevel()->HasAllocatedSpillOperand()) return; |
1732 | 1770 |
1733 int index = range->TopLevel()->GetSpillOperand()->index(); | 1771 int index = range->TopLevel()->GetSpillOperand()->index(); |
1734 if (index >= 0) { | 1772 if (index >= 0) { |
1735 reusable_slots_.Add(range, zone()); | 1773 if (range->Kind() == FLOAT32x4_REGISTERS) { |
| 1774 reusable_xmm_slots_.Add(range, zone()); |
| 1775 } else if (range->Kind() == INT32x4_REGISTERS) { |
| 1776 reusable_xmm_slots_.Add(range, zone()); |
| 1777 } else { |
| 1778 reusable_slots_.Add(range, zone()); |
| 1779 } |
1736 } | 1780 } |
1737 } | 1781 } |
1738 | 1782 |
1739 | 1783 |
1740 LOperand* LAllocator::TryReuseSpillSlot(LiveRange* range) { | 1784 LOperand* LAllocator::TryReuseSpillSlot(LiveRange* range) { |
1741 if (reusable_slots_.is_empty()) return NULL; | 1785 ZoneList<LiveRange*>* reusable_slots = |
1742 if (reusable_slots_.first()->End().Value() > | 1786 (range->Kind() == FLOAT32x4_REGISTERS || |
| 1787 range->Kind() == INT32x4_REGISTERS) |
| 1788 ? &reusable_xmm_slots_ : &reusable_slots_; |
| 1789 if (reusable_slots->is_empty()) return NULL; |
| 1790 if (reusable_slots->first()->End().Value() > |
1743 range->TopLevel()->Start().Value()) { | 1791 range->TopLevel()->Start().Value()) { |
1744 return NULL; | 1792 return NULL; |
1745 } | 1793 } |
1746 LOperand* result = reusable_slots_.first()->TopLevel()->GetSpillOperand(); | 1794 LOperand* result = reusable_slots->first()->TopLevel()->GetSpillOperand(); |
1747 reusable_slots_.Remove(0); | 1795 reusable_slots->Remove(0); |
1748 return result; | 1796 return result; |
1749 } | 1797 } |
1750 | 1798 |
1751 | 1799 |
1752 void LAllocator::ActiveToHandled(LiveRange* range) { | 1800 void LAllocator::ActiveToHandled(LiveRange* range) { |
1753 ASSERT(active_live_ranges_.Contains(range)); | 1801 ASSERT(active_live_ranges_.Contains(range)); |
1754 active_live_ranges_.RemoveElement(range); | 1802 active_live_ranges_.RemoveElement(range); |
1755 TraceAlloc("Moving live range %d from active to handled\n", range->id()); | 1803 TraceAlloc("Moving live range %d from active to handled\n", range->id()); |
1756 FreeSpillSlot(range); | 1804 FreeSpillSlot(range); |
1757 } | 1805 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 LiveRange* cur_inactive = inactive_live_ranges_.at(i); | 1852 LiveRange* cur_inactive = inactive_live_ranges_.at(i); |
1805 ASSERT(cur_inactive->End().Value() > current->Start().Value()); | 1853 ASSERT(cur_inactive->End().Value() > current->Start().Value()); |
1806 LifetimePosition next_intersection = | 1854 LifetimePosition next_intersection = |
1807 cur_inactive->FirstIntersection(current); | 1855 cur_inactive->FirstIntersection(current); |
1808 if (!next_intersection.IsValid()) continue; | 1856 if (!next_intersection.IsValid()) continue; |
1809 int cur_reg = cur_inactive->assigned_register(); | 1857 int cur_reg = cur_inactive->assigned_register(); |
1810 free_until_pos[cur_reg] = Min(free_until_pos[cur_reg], next_intersection); | 1858 free_until_pos[cur_reg] = Min(free_until_pos[cur_reg], next_intersection); |
1811 } | 1859 } |
1812 | 1860 |
1813 LOperand* hint = current->FirstHint(); | 1861 LOperand* hint = current->FirstHint(); |
1814 if (hint != NULL && (hint->IsRegister() || hint->IsDoubleRegister())) { | 1862 if (hint != NULL && (hint->IsRegister() || hint->IsDoubleRegister() || |
| 1863 hint->IsFloat32x4Register() || hint->IsInt32x4Register())) { |
1815 int register_index = hint->index(); | 1864 int register_index = hint->index(); |
1816 TraceAlloc( | 1865 TraceAlloc( |
1817 "Found reg hint %s (free until [%d) for live range %d (end %d[).\n", | 1866 "Found reg hint %s (free until [%d) for live range %d (end %d[).\n", |
1818 RegisterName(register_index), | 1867 RegisterName(register_index), |
1819 free_until_pos[register_index].Value(), | 1868 free_until_pos[register_index].Value(), |
1820 current->id(), | 1869 current->id(), |
1821 current->End().Value()); | 1870 current->End().Value()); |
1822 | 1871 |
1823 // The desired register is free until the end of the current live range. | 1872 // The desired register is free until the end of the current live range. |
1824 if (free_until_pos[register_index].Value() >= current->End().Value()) { | 1873 if (free_until_pos[register_index].Value() >= current->End().Value()) { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 } | 2204 } |
2156 | 2205 |
2157 | 2206 |
2158 void LAllocator::Spill(LiveRange* range) { | 2207 void LAllocator::Spill(LiveRange* range) { |
2159 ASSERT(!range->IsSpilled()); | 2208 ASSERT(!range->IsSpilled()); |
2160 TraceAlloc("Spilling live range %d\n", range->id()); | 2209 TraceAlloc("Spilling live range %d\n", range->id()); |
2161 LiveRange* first = range->TopLevel(); | 2210 LiveRange* first = range->TopLevel(); |
2162 | 2211 |
2163 if (!first->HasAllocatedSpillOperand()) { | 2212 if (!first->HasAllocatedSpillOperand()) { |
2164 LOperand* op = TryReuseSpillSlot(range); | 2213 LOperand* op = TryReuseSpillSlot(range); |
2165 if (op == NULL) op = chunk_->GetNextSpillSlot(range->Kind()); | 2214 if (op == NULL) { |
| 2215 op = chunk_->GetNextSpillSlot(range->Kind()); |
| 2216 } else if (range->Kind() == FLOAT32x4_REGISTERS && |
| 2217 op->kind() != LOperand::FLOAT32x4_STACK_SLOT) { |
| 2218 op = LFloat32x4StackSlot::Create(op->index(), zone()); |
| 2219 } else if (range->Kind() == INT32x4_REGISTERS && |
| 2220 op->kind() != LOperand::INT32x4_STACK_SLOT) { |
| 2221 op = LInt32x4StackSlot::Create(op->index(), zone()); |
| 2222 } |
2166 first->SetSpillOperand(op); | 2223 first->SetSpillOperand(op); |
2167 } | 2224 } |
2168 range->MakeSpilled(chunk()->zone()); | 2225 range->MakeSpilled(chunk()->zone()); |
2169 } | 2226 } |
2170 | 2227 |
2171 | 2228 |
2172 int LAllocator::RegisterCount() const { | 2229 int LAllocator::RegisterCount() const { |
2173 return num_registers_; | 2230 return num_registers_; |
2174 } | 2231 } |
2175 | 2232 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2210 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); | 2267 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); |
2211 } | 2268 } |
2212 | 2269 |
2213 #ifdef DEBUG | 2270 #ifdef DEBUG |
2214 if (allocator_ != NULL) allocator_->Verify(); | 2271 if (allocator_ != NULL) allocator_->Verify(); |
2215 #endif | 2272 #endif |
2216 } | 2273 } |
2217 | 2274 |
2218 | 2275 |
2219 } } // namespace v8::internal | 2276 } } // namespace v8::internal |
OLD | NEW |