mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Clean up some loop logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5d11eb0ed5
commit
f4811a9694
@ -159,12 +159,10 @@ bool LiveIntervals::conflictsWithPhysRegDef(const LiveInterval &li,
|
|||||||
end = I->end.getPrevSlot().getBaseIndex().getNextIndex();
|
end = I->end.getPrevSlot().getBaseIndex().getNextIndex();
|
||||||
index != end;
|
index != end;
|
||||||
index = index.getNextIndex()) {
|
index = index.getNextIndex()) {
|
||||||
// skip deleted instructions
|
|
||||||
while (index != end && !getInstructionFromIndex(index))
|
|
||||||
index = index.getNextIndex();
|
|
||||||
if (index == end) break;
|
|
||||||
|
|
||||||
MachineInstr *MI = getInstructionFromIndex(index);
|
MachineInstr *MI = getInstructionFromIndex(index);
|
||||||
|
if (!MI)
|
||||||
|
continue; // skip deleted instructions
|
||||||
|
|
||||||
unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
|
unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
|
||||||
if (tii_->isMoveInstr(*MI, SrcReg, DstReg, SrcSubReg, DstSubReg))
|
if (tii_->isMoveInstr(*MI, SrcReg, DstReg, SrcSubReg, DstSubReg))
|
||||||
if (SrcReg == li.reg || DstReg == li.reg)
|
if (SrcReg == li.reg || DstReg == li.reg)
|
||||||
@ -201,15 +199,9 @@ bool LiveIntervals::conflictsWithPhysRegRef(LiveInterval &li,
|
|||||||
end = I->end.getPrevSlot().getBaseIndex().getNextIndex();
|
end = I->end.getPrevSlot().getBaseIndex().getNextIndex();
|
||||||
index != end;
|
index != end;
|
||||||
index = index.getNextIndex()) {
|
index = index.getNextIndex()) {
|
||||||
// Skip deleted instructions.
|
MachineInstr *MI = getInstructionFromIndex(index);
|
||||||
MachineInstr *MI = 0;
|
if (!MI)
|
||||||
while (index != end) {
|
continue; // skip deleted instructions
|
||||||
MI = getInstructionFromIndex(index);
|
|
||||||
if (MI)
|
|
||||||
break;
|
|
||||||
index = index.getNextIndex();
|
|
||||||
}
|
|
||||||
if (index == end) break;
|
|
||||||
|
|
||||||
if (JoinedCopies.count(MI))
|
if (JoinedCopies.count(MI))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user