Lines Matching defs:LI
81 // Check if all values in LI are rematerializable
82 bool VirtRegAuxInfo::isRematerializable(const LiveInterval &LI,
86 Register Reg = LI.reg();
88 for (LiveInterval::const_vni_iterator I = LI.vni_begin(), E = LI.vni_end();
132 bool VirtRegAuxInfo::isLiveAtStatepointVarArg(LiveInterval &LI) {
133 return any_of(VRM.getRegInfo().reg_operands(LI.reg()),
142 void VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &LI) {
143 float Weight = weightCalcHelper(LI);
147 LI.setWeight(Weight);
150 static bool canMemFoldInlineAsm(LiveInterval &LI,
152 for (const MachineOperand &MO : MRI.reg_operands(LI.reg())) {
161 float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
168 unsigned NumInstr = 0; // Number of instructions using LI
171 std::pair<unsigned, Register> TargetHint = MRI.getRegAllocationHint(LI.reg());
173 if (LI.isSpillable()) {
174 Register Reg = LI.reg();
181 LI.markNotSpillable();
185 bool IsSpillable = LI.isSpillable();
227 I = MRI.reg_instr_nodbg_begin(LI.reg()),
256 MI->definesRegister(LI.reg(), /*TRI=*/nullptr)) {
257 LI.markNotSpillable();
274 std::tie(Reads, Writes) = MI->readsWritesVirtualRegister(LI.reg());
278 if (Writes && IsExiting && LIS.isLiveOutOfMBB(LI, MBB))
287 Register HintReg = copyHint(MI, LI.reg(), TRI, MRI);
301 MRI.clearSimpleHint(LI.reg());
309 MRI.addRegAllocationHint(LI.reg(), Hint.Reg);
328 if (ShouldUpdateLI && LI.isZeroLength(LIS.getSlotIndexes()) &&
329 !LI.isLiveAtIndexes(LIS.getRegMaskSlots()) &&
330 !isLiveAtStatepointVarArg(LI) && !canMemFoldInlineAsm(LI, MRI)) {
331 LI.markNotSpillable();
339 if (isRematerializable(LI, LIS, VRM, *MF.getSubtarget().getInstrInfo()))
344 return normalize(TotalWeight, LI.getSize(), NumInstr);