Lines Matching refs:current

300   LiveInterval* current = instruction->GetLiveInterval();  in ProcessInstruction()  local
301 if (current == nullptr) return; in ProcessInstruction()
307 DCHECK(unhandled.empty() || current->StartsBeforeOrAt(unhandled.back())); in ProcessInstruction()
309 if (codegen_->NeedsTwoRegisters(current->GetType())) { in ProcessInstruction()
310 current->AddHighInterval(); in ProcessInstruction()
321 if (safepoint_position == current->GetStart()) { in ProcessInstruction()
327 } else if (current->IsDeadAt(safepoint_position)) { in ProcessInstruction()
329 } else if (!current->Covers(safepoint_position)) { in ProcessInstruction()
333 current->AddSafepoint(safepoint); in ProcessInstruction()
335 current->ResetSearchCache(); in ProcessInstruction()
348 current->SetFrom(position + 1); in ProcessInstruction()
349 current->SetRegister(first.reg()); in ProcessInstruction()
351 current->SetFrom(position + 1); in ProcessInstruction()
352 current->SetRegister(first.low()); in ProcessInstruction()
353 LiveInterval* high = current->GetHighInterval(); in ProcessInstruction()
359 current->SetFrom(position + 1); in ProcessInstruction()
360 current->SetRegister(output.reg()); in ProcessInstruction()
363 current->SetFrom(position + 1); in ProcessInstruction()
364 current->SetRegister(output.low()); in ProcessInstruction()
365 LiveInterval* high = current->GetHighInterval(); in ProcessInstruction()
371 current->SetSpillSlot(output.GetStackIndex()); in ProcessInstruction()
381 if (current->HasSpillSlot() || instruction->IsConstant()) { in ProcessInstruction()
383 size_t first_register_use = current->FirstRegisterUse(); in ProcessInstruction()
385 LiveInterval* split = SplitBetween(current, current->GetStart(), first_register_use - 1); in ProcessInstruction()
396 AddSorted(&unhandled, current); in ProcessInstruction()
503 LiveInterval* current = unhandled_->back(); in LinearScan() local
507 DCHECK(!current->IsFixed() && !current->HasSpillSlot()); in LinearScan()
509 DCHECK(unhandled_->empty() || unhandled_->back()->GetStart() >= current->GetStart()); in LinearScan()
511 DCHECK(!current->IsLowInterval() || unhandled_->back()->IsHighInterval()); in LinearScan()
513 DCHECK(current->IsLowInterval() || in LinearScan()
517 size_t position = current->GetStart(); in LinearScan()
562 if (current->IsHighInterval() && !current->GetLowInterval()->HasRegister()) { in LinearScan()
563 DCHECK(!current->HasRegister()); in LinearScan()
570 bool success = TryAllocateFreeReg(current); in LinearScan()
574 success = AllocateBlockedReg(current); in LinearScan()
581 ? Location::RegisterLocation(current->GetRegister()) in LinearScan()
582 : Location::FpuRegisterLocation(current->GetRegister())); in LinearScan()
583 active_.push_back(current); in LinearScan()
584 if (current->HasHighInterval() && !current->GetHighInterval()->HasRegister()) { in LinearScan()
585 current->GetHighInterval()->SetRegister(GetHighForLowRegister(current->GetRegister())); in LinearScan()
617 bool RegisterAllocatorLinearScan::TryAllocateFreeReg(LiveInterval* current) { in TryAllocateFreeReg() argument
634 HInstruction* defined_by = current->GetDefinedBy(); in TryAllocateFreeReg()
635 if (defined_by != nullptr && !current->IsSplit()) { in TryAllocateFreeReg()
646 if (interval->HasRegister() && interval->SameRegisterKind(*current)) { in TryAllocateFreeReg()
665 if (!current->IsSplit() && !inactive->IsFixed()) { in TryAllocateFreeReg()
670 DCHECK_EQ(inactive->FirstIntersectionWith(current), kNoLifetime); in TryAllocateFreeReg()
679 size_t next_intersection = inactive->FirstIntersectionWith(current); in TryAllocateFreeReg()
687 if (current->HasRegister()) { in TryAllocateFreeReg()
689 reg = current->GetRegister(); in TryAllocateFreeReg()
691 DCHECK(current->IsHighInterval()); in TryAllocateFreeReg()
696 DCHECK(!current->IsHighInterval()); in TryAllocateFreeReg()
697 int hint = current->FindFirstRegisterHint(free_until, liveness_); in TryAllocateFreeReg()
701 && !(current->IsLowInterval() && IsBlocked(GetHighForLowRegister(hint)))) { in TryAllocateFreeReg()
704 } else if (current->IsLowInterval()) { in TryAllocateFreeReg()
705 reg = FindAvailableRegisterPair(free_until, current->GetStart()); in TryAllocateFreeReg()
707 reg = FindAvailableRegister(free_until, current); in TryAllocateFreeReg()
717 if (current->IsLowInterval()) { in TryAllocateFreeReg()
719 int high_reg = current->GetHighInterval()->GetRegister(); 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()
777 int RegisterAllocatorLinearScan::FindAvailableRegister(size_t* next_use, LiveInterval* current) con… in FindAvailableRegister()
781 bool prefers_caller_save = !current->HasWillCallSafepoint(); in FindAvailableRegister()
872 bool RegisterAllocatorLinearScan::AllocateBlockedReg(LiveInterval* current) { in AllocateBlockedReg() argument
873 size_t first_register_use = current->FirstRegisterUse(); in AllocateBlockedReg()
874 if (current->HasRegister()) { in AllocateBlockedReg()
875 DCHECK(current->IsHighInterval()); in AllocateBlockedReg()
882 DCHECK(first_register_use != kNoLifetime || (current->GetNextSibling() != nullptr)); in AllocateBlockedReg()
884 AllocateSpillSlotFor(current); in AllocateBlockedReg()
899 next_use[active->GetRegister()] = current->GetStart(); in AllocateBlockedReg()
901 size_t use = active->FirstRegisterUseAfter(current->GetStart()); in AllocateBlockedReg()
913 if (!current->IsSplit() && !inactive->IsFixed()) { in AllocateBlockedReg()
918 DCHECK_EQ(inactive->FirstIntersectionWith(current), kNoLifetime); in AllocateBlockedReg()
922 size_t next_intersection = inactive->FirstIntersectionWith(current); in AllocateBlockedReg()
928 size_t use = inactive->FirstUseAfter(current->GetStart()); in AllocateBlockedReg()
938 if (current->HasRegister()) { in AllocateBlockedReg()
939 DCHECK(current->IsHighInterval()); in AllocateBlockedReg()
940 reg = current->GetRegister(); in AllocateBlockedReg()
943 } else if (current->IsLowInterval()) { in AllocateBlockedReg()
949 DCHECK(!current->IsHighInterval()); in AllocateBlockedReg()
950 reg = FindAvailableRegister(next_use, current); in AllocateBlockedReg()
956 DCHECK(!current->IsHighInterval()); in AllocateBlockedReg()
957 bool is_allocation_at_use_site = (current->GetStart() >= (first_register_use - 1)); in AllocateBlockedReg()
959 if (!current->IsLowInterval()) { in AllocateBlockedReg()
960 DumpInterval(std::cerr, current); in AllocateBlockedReg()
965 << current->GetParent()->GetDefinedBy()->DebugName() << " " in AllocateBlockedReg()
966 << current->GetParent()->GetDefinedBy()->GetId() in AllocateBlockedReg()
976 bool success = TrySplitNonPairOrUnalignedPairIntervalAt(current->GetStart(), in AllocateBlockedReg()
982 DCHECK_EQ(existing->GetLowInterval(), current); in AllocateBlockedReg()
983 unhandled_->push_back(current); in AllocateBlockedReg()
987 AllocateSpillSlotFor(current); in AllocateBlockedReg()
988 LiveInterval* split = SplitBetween(current, current->GetStart(), first_register_use - 1); in AllocateBlockedReg()
989 DCHECK(current != split); in AllocateBlockedReg()
996 current->SetRegister(reg); in AllocateBlockedReg()
1002 LiveInterval* split = Split(active, current->GetStart()); in AllocateBlockedReg()
1017 if (!current->IsSplit() && !inactive->IsFixed()) { in AllocateBlockedReg()
1022 DCHECK_EQ(inactive->FirstIntersectionWith(current), kNoLifetime); in AllocateBlockedReg()
1024 size_t next_intersection = inactive->FirstIntersectionWith(current); in AllocateBlockedReg()
1027 LiveInterval* split = Split(current, next_intersection); in AllocateBlockedReg()
1028 DCHECK_NE(split, current); in AllocateBlockedReg()
1033 LiveInterval* split = Split(inactive, current->GetStart()); in AllocateBlockedReg()
1060 LiveInterval* current = (*array)[i - 1u]; in AddSorted() local
1062 if (current->StartsAfter(interval) && !current->IsHighInterval()) { in AddSorted()