Lines Matching defs:LI
80 // Check if all values in LI are rematerializable
81 bool VirtRegAuxInfo::isRematerializable(const LiveInterval &LI,
85 Register Reg = LI.reg();
87 for (LiveInterval::const_vni_iterator I = LI.vni_begin(), E = LI.vni_end();
131 bool VirtRegAuxInfo::isLiveAtStatepointVarArg(LiveInterval &LI) {
132 return any_of(VRM.getRegInfo().reg_operands(LI.reg()),
141 void VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &LI) {
142 float Weight = weightCalcHelper(LI);
146 LI.setWeight(Weight);
149 static bool canMemFoldInlineAsm(LiveInterval &LI,
151 for (const MachineOperand &MO : MRI.reg_operands(LI.reg())) {
160 float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
167 unsigned NumInstr = 0; // Number of instructions using LI
170 std::pair<unsigned, Register> TargetHint = MRI.getRegAllocationHint(LI.reg());
172 if (LI.isSpillable()) {
173 Register Reg = LI.reg();
180 LI.markNotSpillable();
184 bool IsSpillable = LI.isSpillable();
227 I = MRI.reg_instr_nodbg_begin(LI.reg()),
256 MI->definesRegister(LI.reg(), /*TRI=*/nullptr)) {
257 LI.markNotSpillable();
273 std::tie(Reads, Writes) = MI->readsWritesVirtualRegister(LI.reg());
277 if (Writes && IsExiting && LIS.isLiveOutOfMBB(LI, MBB))
286 Register HintReg = copyHint(MI, LI.reg(), TRI, MRI);
295 MRI.clearSimpleHint(LI.reg());
306 MRI.addRegAllocationHint(LI.reg(), Reg);
324 if (ShouldUpdateLI && LI.isZeroLength(LIS.getSlotIndexes()) &&
325 !LI.isLiveAtIndexes(LIS.getRegMaskSlots()) &&
326 !isLiveAtStatepointVarArg(LI) && !canMemFoldInlineAsm(LI, MRI)) {
327 LI.markNotSpillable();
335 if (isRematerializable(LI, LIS, VRM, *MF.getSubtarget().getInstrInfo()))
340 return normalize(TotalWeight, LI.getSize(), NumInstr);