| /freebsd-12-stable/contrib/llvm-project/llvm/lib/CodeGen/ |
| D | ReachingDefAnalysis.cpp | 33 static bool isValidRegUseOf(const MachineOperand &MO, MCRegister PhysReg) { in isValidRegUseOf() argument 34 return isValidRegUse(MO) && MO.getReg() == PhysReg; in isValidRegUseOf() 41 static bool isValidRegDefOf(const MachineOperand &MO, MCRegister PhysReg) { in isValidRegDefOf() argument 42 return isValidRegDef(MO) && MO.getReg() == PhysReg; in isValidRegDefOf() 62 for (MCRegUnitIterator Unit(LI.PhysReg, TRI); Unit.isValid(); ++Unit) { in enterBasicBlock() 258 MCRegister PhysReg) const { in getReachingDef() 266 for (MCRegUnitIterator Unit(PhysReg, TRI); Unit.isValid(); ++Unit) { in getReachingDef() 279 MCRegister PhysReg) const { in getReachingLocalMIDef() 280 return hasLocalDefBefore(MI, PhysReg) in getReachingLocalMIDef() 281 ? getInstFromId(MI->getParent(), getReachingDef(MI, PhysReg)) in getReachingLocalMIDef() [all …]
|
| D | RegAllocFast.cpp | 101 MCPhysReg PhysReg = 0; ///< Currently held here. member 163 void setPhysRegState(MCPhysReg PhysReg, unsigned NewState); 164 bool isPhysRegFree(MCPhysReg PhysReg) const; 167 void markRegUsedInInstr(MCPhysReg PhysReg) { in markRegUsedInInstr() argument 168 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) in markRegUsedInInstr() 173 bool isClobberedByRegMasks(MCPhysReg PhysReg) const { in isClobberedByRegMasks() 174 return llvm::any_of(RegMasks, [PhysReg](const uint32_t *Mask) { in isClobberedByRegMasks() 175 return MachineOperand::clobbersPhysReg(Mask, PhysReg); in isClobberedByRegMasks() 180 bool isRegUsedInInstr(MCPhysReg PhysReg, bool LookAtPhysRegUses) const { in isRegUsedInInstr() argument 181 if (LookAtPhysRegUses && isClobberedByRegMasks(PhysReg)) in isRegUsedInInstr() [all …]
|
| D | LiveRegMatrix.cpp | 81 LiveInterval &VRegInterval, MCRegister PhysReg, in foreachUnit() argument 84 for (MCRegUnitMaskIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { in foreachUnit() 96 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { in foreachUnit() 104 void LiveRegMatrix::assign(LiveInterval &VirtReg, MCRegister PhysReg) { in assign() argument 106 << printReg(PhysReg, TRI) << ':'); in assign() 108 VRM->assignVirt2Phys(VirtReg.reg(), PhysReg); in assign() 111 TRI, VirtReg, PhysReg, [&](unsigned Unit, const LiveRange &Range) { in assign() 122 Register PhysReg = VRM->getPhys(VirtReg.reg()); in unassign() local 124 << " from " << printReg(PhysReg, TRI) << ':'); in unassign() 127 foreachUnit(TRI, VirtReg, PhysReg, in unassign() [all …]
|
| D | RegAllocGreedy.cpp | 319 void addEviction(MCRegister PhysReg, Register Evictor, Register Evictee) { in addEviction() argument 321 Evictees[Evictee].second = PhysReg; in addEviction() 353 MCRegister PhysReg; member 366 PhysReg = Reg; in reset() 476 MCRegister PhysReg, SlotIndex Start, 484 bool mayRecolorAllInterferences(MCRegister PhysReg, LiveInterval &VirtReg, 509 AllocationOrder &Order, MCRegister PhysReg, 538 MCRegister PhysReg; member 540 HintInfo(BlockFrequency Freq, Register Reg, MCRegister PhysReg) in HintInfo() 541 : Freq(Freq), Reg(Reg), PhysReg(PhysReg) {} in HintInfo() [all …]
|
| D | RegAllocBasic.cpp | 122 bool spillInterferences(LiveInterval &VirtReg, MCRegister PhysReg, 211 bool RABasic::spillInterferences(LiveInterval &VirtReg, MCRegister PhysReg, in spillInterferences() argument 218 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { in spillInterferences() 228 LLVM_DEBUG(dbgs() << "spilling " << printReg(PhysReg, TRI) in spillInterferences() 271 for (MCRegister PhysReg : Order) { in selectOrSplit() local 272 assert(PhysReg.isValid()); in selectOrSplit() 274 switch (Matrix->checkInterference(VirtReg, PhysReg)) { in selectOrSplit() 277 return PhysReg; in selectOrSplit() 281 PhysRegSpillCands.push_back(PhysReg); in selectOrSplit() 291 for (MCRegister &PhysReg : PhysRegSpillCands) { in selectOrSplit() [all …]
|
| D | RegisterClassInfo.cpp | 113 unsigned PhysReg = RawOrder[i]; in compute() local 115 if (Reserved.test(PhysReg)) in compute() 117 uint8_t Cost = RegCosts[PhysReg]; in compute() 120 if (CalleeSavedAliases[PhysReg] && in compute() 121 !STI.ignoreCSRForAllocationOrder(*MF, PhysReg)) in compute() 123 CSRAlias.push_back(PhysReg); in compute() 127 RCI.Order[N++] = PhysReg; in compute() 136 unsigned PhysReg = CSRAlias[i]; in compute() local 137 uint8_t Cost = RegCosts[PhysReg]; in compute() 140 RCI.Order[N++] = PhysReg; in compute()
|
| D | VirtRegMap.cpp | 198 void addLiveInsForSubRanges(const LiveInterval &LI, MCRegister PhysReg) const; 295 MCRegister PhysReg) const { in addLiveInsForSubRanges() 334 MBB->addLiveIn(PhysReg, LaneMask); in addLiveInsForSubRanges() 350 Register PhysReg = VRM->getPhys(VirtReg); in addMBBLiveIns() local 351 if (PhysReg == VirtRegMap::NO_PHYS_REG) { in addMBBLiveIns() 359 addLiveInsForSubRanges(LI, PhysReg); in addMBBLiveIns() 369 MBB->addLiveIn(PhysReg); in addMBBLiveIns() 560 MCRegister PhysReg = VRM->getPhys(VirtReg); in rewrite() local 561 if (PhysReg == VirtRegMap::NO_PHYS_REG) in rewrite() 564 assert(Register(PhysReg).isPhysical()); in rewrite() [all …]
|
| D | InterferenceCache.h | 47 MCRegister PhysReg = 0; variable 105 PhysReg = MCRegister::NoRegister; in clear() 111 MCRegister getPhysReg() const { return PhysReg; } in getPhysReg() 155 Entry *get(MCRegister PhysReg); 208 void setPhysReg(InterferenceCache &Cache, MCRegister PhysReg) { in setPhysReg() argument 212 if (PhysReg.isValid()) in setPhysReg() 213 setEntry(Cache.get(PhysReg)); in setPhysReg()
|
| D | InterferenceCache.cpp | 63 InterferenceCache::Entry *InterferenceCache::get(MCRegister PhysReg) { in get() argument 64 unsigned char E = PhysRegEntries[PhysReg.id()]; in get() 65 if (E < CacheEntries && Entries[E].getPhysReg() == PhysReg) { in get() 81 Entries[E].reset(PhysReg, LIUArray, TRI, MF); in get() 82 PhysRegEntries[PhysReg] = E; in get() 96 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units, ++i) in revalidate() 107 PhysReg = physReg; in reset() 113 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { in reset() 122 for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units, ++i) { in valid() 194 if (MachineOperand::clobbersPhysReg(RegMaskBits[i], PhysReg)) { in update() [all …]
|
| D | MachineRegisterInfo.cpp | 513 bool MachineRegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { in isConstantPhysReg() 514 assert(Register::isPhysicalRegister(PhysReg)); in isConstantPhysReg() 517 if (TRI->isConstantPhysReg(PhysReg)) in isConstantPhysReg() 522 for (MCRegAliasIterator AI(PhysReg, TRI, true); in isConstantPhysReg() 570 bool MachineRegisterInfo::isPhysRegModified(MCRegister PhysReg, in isPhysRegModified() argument 572 if (UsedPhysRegMask.test(PhysReg)) in isPhysRegModified() 575 for (MCRegAliasIterator AI(PhysReg, TRI, true); AI.isValid(); ++AI) { in isPhysRegModified() 585 bool MachineRegisterInfo::isPhysRegUsed(MCRegister PhysReg, in isPhysRegUsed() argument 587 if (!SkipRegMaskTest && UsedPhysRegMask.test(PhysReg)) in isPhysRegUsed() 590 for (MCRegAliasIterator AliasReg(PhysReg, TRI, true); AliasReg.isValid(); in isPhysRegUsed()
|
| D | LiveRangeCalc.cpp | 89 void LiveRangeCalc::extend(LiveRange &LR, SlotIndex Use, unsigned PhysReg, in extend() argument 107 if (findReachingDefs(LR, *UseMBB, Use, PhysReg, Undefs)) in extend() 194 SlotIndex Use, unsigned PhysReg, in findReachingDefs() argument 214 errs() << "Use of " << printReg(PhysReg, MRI->getTargetRegisterInfo()) in findReachingDefs() 222 if (Register::isPhysicalRegister(PhysReg) && !MBB->isLiveIn(PhysReg)) { in findReachingDefs() 225 errs() << "The register " << printReg(PhysReg, TRI) in findReachingDefs()
|
| D | MachineBasicBlock.cpp | 418 OS << LS << printReg(LI.PhysReg, TRI); in print() 559 LiveIns, [Reg](const RegisterMaskPair &LI) { return LI.PhysReg == Reg; }); in removeLiveIn() 577 LiveIns, [Reg](const RegisterMaskPair &LI) { return LI.PhysReg == Reg; }); in isLiveIn() 584 return LI0.PhysReg < LI1.PhysReg; in sortUniqueLiveIns() 591 MCRegister PhysReg = I->PhysReg; in sortUniqueLiveIns() local 593 for (J = std::next(I); J != LiveIns.end() && J->PhysReg == PhysReg; ++J) in sortUniqueLiveIns() 595 Out->PhysReg = PhysReg; in sortUniqueLiveIns() 602 MachineBasicBlock::addLiveIn(MCRegister PhysReg, const TargetRegisterClass *RC) { in addLiveIn() argument 604 assert(Register::isPhysicalRegister(PhysReg) && "Expected physreg"); in addLiveIn() 609 bool LiveIn = isLiveIn(PhysReg); in addLiveIn() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
| D | ReachingDefAnalysis.h | 142 int getReachingDef(MachineInstr *MI, MCRegister PhysReg) const; 146 MCRegister PhysReg) const; 150 bool isReachingDefLiveOut(MachineInstr *MI, MCRegister PhysReg) const; 155 MCRegister PhysReg) const; 160 MCRegister PhysReg) const; 172 bool hasLocalDefBefore(MachineInstr *MI, MCRegister PhysReg) const; 176 bool isRegUsedAfter(MachineInstr *MI, MCRegister PhysReg) const; 179 bool isRegDefinedAfter(MachineInstr *MI, MCRegister PhysReg) const; 183 int getClearance(MachineInstr *MI, MCRegister PhysReg) const; 187 void getReachingLocalUses(MachineInstr *MI, MCRegister PhysReg, [all …]
|
| D | LiveRegMatrix.h | 107 InterferenceKind checkInterference(LiveInterval &VirtReg, MCRegister PhysReg); 114 bool checkInterference(SlotIndex Start, SlotIndex End, MCRegister PhysReg); 119 void assign(LiveInterval &VirtReg, MCRegister PhysReg); 127 bool isPhysRegUsed(MCRegister PhysReg) const; 140 MCRegister PhysReg = MCRegister::NoRegister); 145 bool checkRegUnitInterference(LiveInterval &VirtReg, MCRegister PhysReg); 157 Register getOneVReg(unsigned PhysReg) const;
|
| D | RegisterClassInfo.h | 116 MCRegister getLastCalleeSavedAlias(MCRegister PhysReg) const { in getLastCalleeSavedAlias() argument 117 if (PhysReg.id() < CalleeSavedAliases.size()) in getLastCalleeSavedAlias() 118 return CalleeSavedAliases[PhysReg]; in getLastCalleeSavedAlias()
|
| D | LiveIntervalCalc.h | 54 void extendToUses(LiveRange &LR, MCRegister PhysReg) { in extendToUses() argument 55 extendToUses(LR, PhysReg, LaneBitmask::getAll()); in extendToUses()
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| D | SIPreAllocateWWMRegs.cpp | 103 for (MCRegister PhysReg : RegClassInfo.getOrder(MRI->getRegClass(Reg))) { in processDef() local 104 if (!MRI->isPhysRegUsed(PhysReg) && in processDef() 105 Matrix->checkInterference(LI, PhysReg) == LiveRegMatrix::IK_Free) { in processDef() 106 Matrix->assign(LI, PhysReg); in processDef() 107 assert(PhysReg != 0); in processDef() 131 Register PhysReg = VRM->getPhys(VirtReg); in rewriteRegs() local 134 PhysReg = TRI->getSubReg(PhysReg, SubReg); in rewriteRegs() 138 MO.setReg(PhysReg); in rewriteRegs() 150 const Register PhysReg = VRM->getPhys(Reg); in rewriteRegs() local 151 assert(PhysReg != 0); in rewriteRegs() [all …]
|
| D | GCNNSAReassign.cpp | 176 Register PhysReg = VRM->getPhys(Reg); in CheckNSA() local 179 if (!PhysReg) in CheckNSA() 203 if (Def && Def->isCopy() && Def->getOperand(1).getReg() == PhysReg) in CheckNSA() 210 if (UseInst->isCopy() && UseInst->getOperand(0).getReg() == PhysReg) in CheckNSA() 219 VgprBase = PhysReg; in CheckNSA() 220 else if (VgprBase + I != PhysReg) in CheckNSA()
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/PowerPC/GISel/ |
| D | PPCCallLowering.cpp | 82 Register PhysReg, in assignValueToReg() argument 84 markPhysRegUsed(PhysReg); in assignValueToReg() 85 IncomingValueHandler::assignValueToReg(ValVReg, PhysReg, VA); in assignValueToReg() 120 void FormalArgHandler::markPhysRegUsed(unsigned PhysReg) { in markPhysRegUsed() argument 121 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed() 122 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed()
|
| D | PPCCallLowering.h | 48 void assignValueToReg(Register ValVReg, Register PhysReg, 58 virtual void markPhysRegUsed(unsigned PhysReg) = 0; 63 void markPhysRegUsed(unsigned PhysReg) override;
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/ARM/ |
| D | ARMCallLowering.cpp | 111 void assignValueToReg(Register ValVReg, Register PhysReg, in assignValueToReg() 114 assert(VA.getLocReg() == PhysReg && "Assigning to the wrong reg?"); in assignValueToReg() 120 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg() 121 MIB.addUse(PhysReg, RegState::Implicit); in assignValueToReg() 275 void assignValueToReg(Register ValVReg, Register PhysReg, in assignValueToReg() 278 assert(VA.getLocReg() == PhysReg && "Assigning to the wrong reg?"); in assignValueToReg() 286 markPhysRegUsed(PhysReg); in assignValueToReg() 288 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg() 295 auto PhysRegToVReg = MIRBuilder.buildCopy(LLT::scalar(LocSize), PhysReg); in assignValueToReg() 339 virtual void markPhysRegUsed(unsigned PhysReg) = 0; [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/M68k/GlSel/ |
| D | M68kCallLowering.cpp | 35 void assignValueToReg(Register ValVReg, Register PhysReg, in assignValueToReg() 37 MIB.addUse(PhysReg, RegState::Implicit); in assignValueToReg() 39 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg() 112 Register PhysReg, in assignValueToReg() argument 114 MIRBuilder.getMRI()->addLiveIn(PhysReg); in assignValueToReg() 115 MIRBuilder.getMBB().addLiveIn(PhysReg); in assignValueToReg() 116 IncomingValueHandler::assignValueToReg(ValVReg, PhysReg, VA); in assignValueToReg()
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/X86/ |
| D | X86CallLowering.cpp | 107 void assignValueToReg(Register ValVReg, Register PhysReg, in assignValueToReg() 109 MIB.addUse(PhysReg, RegState::Implicit); in assignValueToReg() 111 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg() 197 void assignValueToReg(Register ValVReg, Register PhysReg, in assignValueToReg() 199 markPhysRegUsed(PhysReg); in assignValueToReg() 200 IncomingValueHandler::assignValueToReg(ValVReg, PhysReg, VA); in assignValueToReg() 206 virtual void markPhysRegUsed(unsigned PhysReg) = 0; 216 void markPhysRegUsed(unsigned PhysReg) override { in markPhysRegUsed() 217 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed() 218 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
| D | SystemZRegisterInfo.cpp | 42 Register PhysReg = VRM->getPhys(MO.getReg()); in getRC32() local 43 if (SystemZ::GR32BitRegClass.contains(PhysReg)) in getRC32() 45 assert (SystemZ::GRH32BitRegClass.contains(PhysReg) && in getRC32() 110 Register PhysReg = Register::isPhysicalRegister(Reg) in getRegAllocationHints() local 113 if (PhysReg) { in getRegAllocationHints() 115 PhysReg = getSubReg(PhysReg, MO->getSubReg()); in getRegAllocationHints() 117 PhysReg = getMatchingSuperReg(PhysReg, VRRegMO->getSubReg(), in getRegAllocationHints() 119 if (!MRI->isReserved(PhysReg) && !is_contained(Hints, PhysReg)) in getRegAllocationHints() 120 TwoAddrHints.insert(PhysReg); in getRegAllocationHints()
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/Mips/ |
| D | MipsCallLowering.cpp | 94 void assignValueToReg(Register ValVReg, Register PhysReg, 106 virtual void markPhysRegUsed(unsigned PhysReg) { in markPhysRegUsed() argument 107 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed() 108 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed() 119 void markPhysRegUsed(unsigned PhysReg) override { in markPhysRegUsed() argument 120 MIB.addDef(PhysReg, RegState::Implicit); in markPhysRegUsed() 129 Register PhysReg, in assignValueToReg() argument 131 markPhysRegUsed(PhysReg); in assignValueToReg() 132 IncomingValueHandler::assignValueToReg(ValVReg, PhysReg, VA); in assignValueToReg() 199 void assignValueToReg(Register ValVReg, Register PhysReg, [all …]
|