mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
Use skipInstruction() as a simpler way of iterating over instructions using SrcReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107234 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5bd68ed08
commit
170c41f3d5
@ -742,16 +742,8 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(const CoalescerPair &CP) {
|
||||
unsigned DstReg = CP.getDstReg();
|
||||
unsigned SubIdx = CP.getSubIdx();
|
||||
|
||||
// Collect all the instructions using SrcReg.
|
||||
SmallPtrSet<MachineInstr*, 32> Instrs;
|
||||
for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(SrcReg),
|
||||
E = mri_->reg_end(); I != E; ++I)
|
||||
Instrs.insert(&*I);
|
||||
|
||||
for (SmallPtrSet<MachineInstr*, 32>::const_iterator I = Instrs.begin(),
|
||||
E = Instrs.end(); I != E; ++I) {
|
||||
MachineInstr *UseMI = *I;
|
||||
|
||||
for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(SrcReg);
|
||||
MachineInstr *UseMI = I.skipInstruction();) {
|
||||
// A PhysReg copy that won't be coalesced can perhaps be rematerialized
|
||||
// instead.
|
||||
if (DstIsPhys) {
|
||||
|
Loading…
Reference in New Issue
Block a user