Lines Matching +full:non +full:- +full:urgent

1 //===- RegAllocEvictionAdvisor.cpp - eviction advisor ---------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
30 "regalloc-enable-advisor", cl::Hidden,
42 "enable-local-reassign", cl::Hidden,
49 "regalloc-eviction-max-interference-cutoff", cl::Hidden,
52 "is a compilation cost-saving consideration. To "
63 INITIALIZE_PASS(RegAllocEvictionAdvisorAnalysis, "regalloc-evict",
76 return R->getAdvisorMode() == AdvisorMode::Default; in classof()
130 MRI(&VRM->getRegInfo()), TRI(MF.getSubtarget().getRegisterInfo()), in RegAllocEvictionAdvisor()
131 RegClassInfo(RA.getRegClassInfo()), RegCosts(TRI->getRegisterCosts(MF)), in RegAllocEvictionAdvisor()
136 /// shouldEvict - determine if A should evict the assigned live range B. The
166 /// canEvictHintInterference - return true if the interference for VirtReg
177 /// canEvictInterferenceBasedOnCost - Return true if all interferences between
190 if (Matrix->checkInterference(VirtReg, PhysReg) > LiveRegMatrix::IK_VirtReg) in canEvictInterferenceBasedOnCost()
193 bool IsLocal = VirtReg.empty() || LIS->intervalIsInOneMBB(VirtReg); in canEvictInterferenceBasedOnCost()
205 for (MCRegUnit Unit : TRI->regunits(PhysReg)) { in canEvictInterferenceBasedOnCost()
206 LiveIntervalUnion::Query &Q = Matrix->query(VirtReg, Unit); in canEvictInterferenceBasedOnCost()
214 assert(Intf->reg().isVirtual() && in canEvictInterferenceBasedOnCost()
218 // of last-chance recoloring and this virtual register is one that we in canEvictInterferenceBasedOnCost()
220 if (FixedRegisters.count(Intf->reg())) in canEvictInterferenceBasedOnCost()
226 // Once a live range becomes small enough, it is urgent that we find a in canEvictInterferenceBasedOnCost()
228 // urgent live ranges get to evict almost anything. in canEvictInterferenceBasedOnCost()
230 // Also allow urgent evictions of unspillable ranges from a strictly in canEvictInterferenceBasedOnCost()
232 bool Urgent = in canEvictInterferenceBasedOnCost() local
234 (Intf->isSpillable() || in canEvictInterferenceBasedOnCost()
235 RegClassInfo.getNumAllocatableRegs(MRI->getRegClass(VirtReg.reg())) < in canEvictInterferenceBasedOnCost()
237 MRI->getRegClass(Intf->reg()))); in canEvictInterferenceBasedOnCost()
239 unsigned IntfCascade = RA.getExtraInfo().getCascade(Intf->reg()); in canEvictInterferenceBasedOnCost()
244 if (!Urgent) in canEvictInterferenceBasedOnCost()
246 // We permit breaking cascades for urgent evictions. It should be the in canEvictInterferenceBasedOnCost()
251 bool BreaksHint = VRM->hasPreferredPhys(Intf->reg()); in canEvictInterferenceBasedOnCost()
254 Cost.MaxWeight = std::max(Cost.MaxWeight, Intf->weight()); in canEvictInterferenceBasedOnCost()
258 if (Urgent) in canEvictInterferenceBasedOnCost()
260 // Apply the eviction policy for non-urgent evictions. in canEvictInterferenceBasedOnCost()
266 if (!MaxCost.isMax() && IsLocal && LIS->intervalIsInOneMBB(*Intf) && in canEvictInterferenceBasedOnCost()