• Home
  • Raw
  • Download

Lines Matching refs:VirtReg

125   virtual unsigned selectOrSplit(LiveInterval &VirtReg,
268 LiveInterval &VirtReg = *I->second; in seedLiveRegs() local
270 PhysReg2LiveUnion[RegNum].unify(VirtReg); in seedLiveRegs()
272 enqueue(&VirtReg); in seedLiveRegs()
276 void RegAllocBase::assign(LiveInterval &VirtReg, unsigned PhysReg) { in assign() argument
277 DEBUG(dbgs() << "assigning " << PrintReg(VirtReg.reg, TRI) in assign()
279 assert(!VRM->hasPhys(VirtReg.reg) && "Duplicate VirtReg assignment"); in assign()
280 VRM->assignVirt2Phys(VirtReg.reg, PhysReg); in assign()
282 PhysReg2LiveUnion[PhysReg].unify(VirtReg); in assign()
286 void RegAllocBase::unassign(LiveInterval &VirtReg, unsigned PhysReg) { in unassign() argument
287 DEBUG(dbgs() << "unassigning " << PrintReg(VirtReg.reg, TRI) in unassign()
289 assert(VRM->getPhys(VirtReg.reg) == PhysReg && "Inconsistent unassign"); in unassign()
290 PhysReg2LiveUnion[PhysReg].extract(VirtReg); in unassign()
291 VRM->clearVirt(VirtReg.reg); in unassign()
301 while (LiveInterval *VirtReg = dequeue()) { in allocatePhysRegs() local
302 assert(!VRM->hasPhys(VirtReg->reg) && "Register already assigned"); in allocatePhysRegs()
305 if (MRI->reg_nodbg_empty(VirtReg->reg)) { in allocatePhysRegs()
306 DEBUG(dbgs() << "Dropping unused " << *VirtReg << '\n'); in allocatePhysRegs()
307 LIS->removeInterval(VirtReg->reg); in allocatePhysRegs()
318 << MRI->getRegClass(VirtReg->reg)->getName() in allocatePhysRegs()
319 << ':' << *VirtReg << '\n'); in allocatePhysRegs()
322 unsigned AvailablePhysReg = selectOrSplit(*VirtReg, SplitVRegs); in allocatePhysRegs()
329 for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(VirtReg->reg); in allocatePhysRegs()
338 VRM->assignVirt2Phys(VirtReg->reg, in allocatePhysRegs()
339 RegClassInfo.getOrder(MRI->getRegClass(VirtReg->reg)).front()); in allocatePhysRegs()
344 assign(*VirtReg, AvailablePhysReg); in allocatePhysRegs()
367 unsigned RegAllocBase::checkPhysRegInterference(LiveInterval &VirtReg, in checkPhysRegInterference() argument
370 if (query(VirtReg, *AliasI).checkInterference()) in checkPhysRegInterference()
377 void RegAllocBase::spillReg(LiveInterval& VirtReg, unsigned PhysReg, in spillReg() argument
379 LiveIntervalUnion::Query &Q = query(VirtReg, PhysReg); in spillReg()
406 RegAllocBase::spillInterferences(LiveInterval &VirtReg, unsigned PhysReg, in spillInterferences() argument
413 LiveIntervalUnion::Query &QAlias = query(VirtReg, *asI); in spillInterferences()
420 " interferences with " << VirtReg << "\n"); in spillInterferences()
425 spillReg(VirtReg, *AliasI, SplitVRegs); in spillInterferences()
482 unsigned RABasic::selectOrSplit(LiveInterval &VirtReg, in selectOrSplit() argument
489 RegClassInfo.getOrder(MRI->getRegClass(VirtReg.reg)); in selectOrSplit()
496 unsigned interfReg = checkPhysRegInterference(VirtReg, PhysReg); in selectOrSplit()
507 if (interferingVirtReg->weight < VirtReg.weight ) { in selectOrSplit()
515 if (!spillInterferences(VirtReg, *PhysRegI, SplitVRegs)) continue; in selectOrSplit()
517 assert(checkPhysRegInterference(VirtReg, *PhysRegI) == 0 && in selectOrSplit()
524 DEBUG(dbgs() << "spilling: " << VirtReg << '\n'); in selectOrSplit()
525 if (!VirtReg.isSpillable()) in selectOrSplit()
527 LiveRangeEdit LRE(VirtReg, SplitVRegs); in selectOrSplit()