Lines Matching refs:reg
37 static int GetHighForLowRegister(int reg) { return reg + 1; } in GetHighForLowRegister() argument
38 static bool IsLowRegister(int reg) { return (reg & 1) == 0; } in IsLowRegister() argument
132 int reg = location.reg(); in BlockRegister() local
135 ? physical_core_register_intervals_[reg] in BlockRegister()
136 : physical_fp_register_intervals_[reg]; in BlockRegister()
141 interval = LiveInterval::MakeFixedInterval(allocator_, reg, type); in BlockRegister()
143 physical_core_register_intervals_[reg] = interval; in BlockRegister()
145 physical_fp_register_intervals_[reg] = interval; in BlockRegister()
148 DCHECK(interval->GetRegister() == reg); in BlockRegister()
349 current->SetRegister(first.reg()); in ProcessInstruction()
360 current->SetRegister(output.reg()); in ProcessInstruction()
686 int reg = kNoRegister; in TryAllocateFreeReg() local
689 reg = current->GetRegister(); in TryAllocateFreeReg()
690 if (free_until[reg] == 0) { in TryAllocateFreeReg()
703 reg = hint; in TryAllocateFreeReg()
705 reg = FindAvailableRegisterPair(free_until, current->GetStart()); in TryAllocateFreeReg()
707 reg = FindAvailableRegister(free_until, current); in TryAllocateFreeReg()
711 DCHECK_NE(reg, kNoRegister); in TryAllocateFreeReg()
713 if (free_until[reg] == 0) { in TryAllocateFreeReg()
721 high_reg = GetHighForLowRegister(reg); in TryAllocateFreeReg()
728 current->SetRegister(reg); in TryAllocateFreeReg()
729 if (!current->IsDeadAt(free_until[reg])) { in TryAllocateFreeReg()
733 LiveInterval* split = SplitBetween(current, current->GetStart(), free_until[reg]); in TryAllocateFreeReg()
740 bool RegisterAllocatorLinearScan::IsBlocked(int reg) const { in IsBlocked()
742 ? blocked_core_registers_[reg] in IsBlocked()
743 : blocked_fp_registers_[reg]; in IsBlocked()
747 int reg = kNoRegister; in FindAvailableRegisterPair() local
754 int existing_high_register = GetHighForLowRegister(reg); in FindAvailableRegisterPair()
755 if ((reg == kNoRegister) || (next_use[i] >= next_use[reg] in FindAvailableRegisterPair()
757 reg = i; in FindAvailableRegisterPair()
762 } else if (next_use[reg] <= starting_at || next_use[existing_high_register] <= starting_at) { in FindAvailableRegisterPair()
765 reg = i; in FindAvailableRegisterPair()
768 return reg; in FindAvailableRegisterPair()
771 bool RegisterAllocatorLinearScan::IsCallerSaveRegister(int reg) const { in IsCallerSaveRegister()
773 ? !codegen_->IsCoreCalleeSaveRegister(reg) in IsCallerSaveRegister()
774 : !codegen_->IsFloatingPointCalleeSaveRegister(reg); in IsCallerSaveRegister()
782 int reg = kNoRegister; in FindAvailableRegister() local
795 if (reg == kNoRegister || next_use[reg] != kMaxLifetimePosition) { in FindAvailableRegister()
796 reg = i; in FindAvailableRegister()
801 reg = i; in FindAvailableRegister()
808 if (reg == kNoRegister) { in FindAvailableRegister()
809 reg = i; in FindAvailableRegister()
814 if (next_use[i] > next_use[reg]) { in FindAvailableRegister()
815 reg = i; in FindAvailableRegister()
819 return reg; in FindAvailableRegister()
936 int reg = kNoRegister; in AllocateBlockedReg() local
940 reg = current->GetRegister(); in AllocateBlockedReg()
942 DCHECK_LT(first_register_use, next_use[reg]); in AllocateBlockedReg()
944 reg = FindAvailableRegisterPair(next_use, first_register_use); in AllocateBlockedReg()
946 should_spill = (first_register_use >= next_use[reg]) in AllocateBlockedReg()
947 || (first_register_use >= next_use[GetHighForLowRegister(reg)]); in AllocateBlockedReg()
950 reg = FindAvailableRegister(next_use, current); in AllocateBlockedReg()
951 should_spill = (first_register_use >= next_use[reg]); in AllocateBlockedReg()
954 DCHECK_NE(reg, kNoRegister); in AllocateBlockedReg()
996 current->SetRegister(reg); in AllocateBlockedReg()
1000 if (active->GetRegister() == reg) { in AllocateBlockedReg()
1016 if (inactive->GetRegister() == reg) { in AllocateBlockedReg()