Lines Matching refs:reg

38 static int GetHighForLowRegister(int reg) { return reg + 1; }  in GetHighForLowRegister()  argument
39 static bool IsLowRegister(int reg) { return (reg & 1) == 0; } in IsLowRegister() argument
133 int reg = location.reg(); in BlockRegister() local
137 if ((registers_blocked_for_call & (1u << reg)) != 0u) { in BlockRegister()
144 ? physical_core_register_intervals_[reg] in BlockRegister()
145 : physical_fp_register_intervals_[reg]; in BlockRegister()
150 interval = LiveInterval::MakeFixedInterval(allocator_, reg, type); in BlockRegister()
152 physical_core_register_intervals_[reg] = interval; in BlockRegister()
154 physical_fp_register_intervals_[reg] = interval; in BlockRegister()
157 DCHECK(interval->GetRegister() == reg); in BlockRegister()
431 current->SetRegister(first.reg()); in CheckForFixedOutput()
442 current->SetRegister(output.reg()); in CheckForFixedOutput()
717 for (uint32_t reg : LowToHighBits(register_mask)) { in TryAllocateFreeReg() local
718 free_until[reg] = 0; in TryAllocateFreeReg()
768 for (uint32_t reg : LowToHighBits(register_mask)) { in TryAllocateFreeReg() local
769 if (free_until[reg] == 0) { in TryAllocateFreeReg()
771 register_mask &= ~(1u << reg); in TryAllocateFreeReg()
777 for (uint32_t reg : LowToHighBits(register_mask)) { in TryAllocateFreeReg() local
778 free_until[reg] = std::min(free_until[reg], next_intersection); in TryAllocateFreeReg()
784 int reg = kNoRegister; in TryAllocateFreeReg() local
787 reg = current->GetRegister(); in TryAllocateFreeReg()
788 if (free_until[reg] == 0) { in TryAllocateFreeReg()
801 reg = hint; in TryAllocateFreeReg()
803 reg = FindAvailableRegisterPair(free_until, current->GetStart()); in TryAllocateFreeReg()
805 reg = FindAvailableRegister(free_until, current); in TryAllocateFreeReg()
809 DCHECK_NE(reg, kNoRegister); in TryAllocateFreeReg()
811 if (free_until[reg] == 0) { in TryAllocateFreeReg()
819 high_reg = GetHighForLowRegister(reg); in TryAllocateFreeReg()
826 current->SetRegister(reg); in TryAllocateFreeReg()
827 if (!current->IsDeadAt(free_until[reg])) { in TryAllocateFreeReg()
831 LiveInterval* split = SplitBetween(current, current->GetStart(), free_until[reg]); in TryAllocateFreeReg()
838 bool RegisterAllocatorLinearScan::IsBlocked(int reg) const { in IsBlocked()
840 ? blocked_core_registers_[reg] in IsBlocked()
841 : blocked_fp_registers_[reg]; in IsBlocked()
845 int reg = kNoRegister; in FindAvailableRegisterPair() local
852 int existing_high_register = GetHighForLowRegister(reg); in FindAvailableRegisterPair()
853 if ((reg == kNoRegister) || (next_use[i] >= next_use[reg] in FindAvailableRegisterPair()
855 reg = i; in FindAvailableRegisterPair()
860 } else if (next_use[reg] <= starting_at || next_use[existing_high_register] <= starting_at) { in FindAvailableRegisterPair()
863 reg = i; in FindAvailableRegisterPair()
866 return reg; in FindAvailableRegisterPair()
869 bool RegisterAllocatorLinearScan::IsCallerSaveRegister(int reg) const { in IsCallerSaveRegister()
873 DCHECK_LT(static_cast<size_t>(reg), BitSizeOf<uint32_t>()); in IsCallerSaveRegister()
874 return (registers_blocked_for_call & (1u << reg)) != 0u; in IsCallerSaveRegister()
882 int reg = kNoRegister; in FindAvailableRegister() local
895 if (reg == kNoRegister || next_use[reg] != kMaxLifetimePosition) { in FindAvailableRegister()
896 reg = i; in FindAvailableRegister()
901 reg = i; in FindAvailableRegister()
908 if (reg == kNoRegister) { in FindAvailableRegister()
909 reg = i; in FindAvailableRegister()
914 if (next_use[i] > next_use[reg]) { in FindAvailableRegister()
915 reg = i; in FindAvailableRegister()
919 return reg; in FindAvailableRegister()
1001 for (uint32_t reg : LowToHighBits(register_mask)) { in AllocateBlockedReg() local
1002 next_use[reg] = current->GetStart(); in AllocateBlockedReg()
1032 for (uint32_t reg : LowToHighBits(register_mask)) { in AllocateBlockedReg() local
1033 next_use[reg] = std::min(next_intersection, next_use[reg]); in AllocateBlockedReg()
1044 int reg = kNoRegister; in AllocateBlockedReg() local
1048 reg = current->GetRegister(); in AllocateBlockedReg()
1050 DCHECK_LT(first_register_use, next_use[reg]); in AllocateBlockedReg()
1052 reg = FindAvailableRegisterPair(next_use, first_register_use); in AllocateBlockedReg()
1054 should_spill = (first_register_use >= next_use[reg]) in AllocateBlockedReg()
1055 || (first_register_use >= next_use[GetHighForLowRegister(reg)]); in AllocateBlockedReg()
1058 reg = FindAvailableRegister(next_use, current); in AllocateBlockedReg()
1059 should_spill = (first_register_use >= next_use[reg]); in AllocateBlockedReg()
1062 DCHECK_NE(reg, kNoRegister); in AllocateBlockedReg()
1104 current->SetRegister(reg); in AllocateBlockedReg()
1109 (GetRegisterMask(active, current_register_type_) & (1u << reg)) == 0u); in AllocateBlockedReg()
1110 if (active->GetRegister() == reg) { in AllocateBlockedReg()
1126 if ((GetRegisterMask(inactive, current_register_type_) & (1u << reg)) != 0u) { in AllocateBlockedReg()