Skip to content

Commit 05efbc0

Browse files
committed
Move physreg handling. Not sure if necessary
1 parent aad2887 commit 05efbc0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/lib/CodeGen/RegAllocBase.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,6 @@ void RegAllocBase::cleanupFailedVRegs() {
180180
for (const LiveInterval *InterferingReg : Q.interferingVRegs())
181181
JunkRegs.insert(InterferingReg->reg());
182182
}
183-
184-
// The liveness of the assigned physical register is also now unreliable.
185-
for (MCRegAliasIterator Aliases(PhysReg, TRI, true); Aliases.isValid();
186-
++Aliases) {
187-
for (MachineOperand &MO : MRI->reg_operands(*Aliases)) {
188-
if (MO.readsReg())
189-
MO.setIsUndef(true);
190-
}
191-
}
192183
}
193184

194185
for (Register JunkReg : JunkRegs) {
@@ -201,6 +192,15 @@ void RegAllocBase::cleanupFailedVRegs() {
201192
MO.setIsUndef(true);
202193
}
203194

195+
// The liveness of the assigned physical register is also now unreliable.
196+
for (MCRegAliasIterator Aliases(PhysReg, TRI, true); Aliases.isValid();
197+
++Aliases) {
198+
for (MachineOperand &MO : MRI->reg_operands(*Aliases)) {
199+
if (MO.readsReg())
200+
MO.setIsUndef(true);
201+
}
202+
}
203+
204204
LiveInterval &JunkLI = LIS->getInterval(JunkReg);
205205
if (LIS->shrinkToUses(&JunkLI)) {
206206
SmallVector<LiveInterval *, 8> SplitLIs;

0 commit comments

Comments
 (0)