Lines Matching refs:Reg
67 unsigned Reg = *AI;
68 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
69 KillIndices[Reg] = BBSize;
70 DefIndices[Reg] = ~0u;
82 unsigned Reg = *AI;
83 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
84 KillIndices[Reg] = BBSize;
85 DefIndices[Reg] = ~0u;
108 for (unsigned Reg = 0; Reg != TRI->getNumRegs(); ++Reg) {
109 if (KillIndices[Reg] != ~0u) {
110 // If Reg is currently live, then mark that it can't be renamed as
113 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
114 KillIndices[Reg] = Count;
115 } else if (DefIndices[Reg] < InsertPosIndex && DefIndices[Reg] >= Count) {
120 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
124 DefIndices[Reg] = InsertPosIndex;
180 unsigned Reg = MO.getReg();
181 if (Reg == 0) continue;
189 if (!Classes[Reg] && NewRC)
190 Classes[Reg] = NewRC;
191 else if (!NewRC || Classes[Reg] != NewRC)
192 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
195 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) {
196 // If an alias of the reg is used during the live range, give up.
202 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
207 if (Classes[Reg] != reinterpret_cast<TargetRegisterClass *>(-1))
208 RegRefs.insert(std::make_pair(Reg, &MO));
210 // If this reg is tied and live (Classes[Reg] is set to -1), we can't change
212 // reg because not all uses of the same reg within an instruction are
221 Classes[Reg] == reinterpret_cast<TargetRegisterClass *>(-1)) {
222 for (MCSubRegIterator SubRegs(Reg, TRI, /*IncludeSelf=*/true);
226 for (MCSuperRegIterator SuperRegs(Reg, TRI);
233 if (!KeepRegs.test(Reg)) {
234 for (MCSubRegIterator SubRegs(Reg, TRI, /*IncludeSelf=*/true);
266 unsigned Reg = MO.getReg();
267 if (Reg == 0) continue;
270 // If we've already marked this reg as unchangeable, carry on.
271 if (KeepRegs.test(Reg)) continue;
277 // we don't have to repeat all this code for the reg itself.
278 DefIndices[Reg] = Count;
279 KillIndices[Reg] = ~0u;
280 assert(((KillIndices[Reg] == ~0u) !=
281 (DefIndices[Reg] == ~0u)) &&
282 "Kill and Def maps aren't consistent for Reg!");
283 KeepRegs.reset(Reg);
284 Classes[Reg] = nullptr;
285 RegRefs.erase(Reg);
287 for (MCSubRegIterator SubRegs(Reg, TRI); SubRegs.isValid(); ++SubRegs) {
296 for (MCSuperRegIterator SR(Reg, TRI); SR.isValid(); ++SR)
303 unsigned Reg = MO.getReg();
304 if (Reg == 0) continue;
313 if (!Classes[Reg] && NewRC)
314 Classes[Reg] = NewRC;
315 else if (!NewRC || Classes[Reg] != NewRC)
316 Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
318 RegRefs.insert(std::make_pair(Reg, &MO));
321 // have to repeat all this code for the reg itself.
324 if (KillIndices[Reg] == ~0u) {
325 KillIndices[Reg] = Count;
326 DefIndices[Reg] = ~0u;
327 assert(((KillIndices[Reg] == ~0u) !=
328 (DefIndices[Reg] == ~0u)) &&
329 "Kill and Def maps aren't consistent for Reg!");
332 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) {
475 for (unsigned Reg = 0; Reg < TRI->getNumRegs(); ++Reg) {
476 if (KillIndices[Reg] == ~0u)
477 DEBUG(dbgs() << " " << TRI->getName(Reg));
624 unsigned Reg = MO.getReg();
625 if (Reg == 0) continue;
626 if (MO.isUse() && TRI->regsOverlap(AntiDepReg, Reg)) {
630 if (MO.isDef() && Reg != AntiDepReg)
631 ForbidRegs.push_back(Reg);
678 // liveness information for the anti-dependence reg is now