mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Rewrite loop to suit Chris' preference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
45282aedb9
commit
1d0aeabe3f
@ -611,23 +611,26 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
|
||||
|
||||
MachineBasicBlock::iterator E = MBB->end();
|
||||
while (mi != E) {
|
||||
if (!mi->isDebugValue()) {
|
||||
if (mi->killsRegister(interval.reg, tri_)) {
|
||||
DEBUG(dbgs() << " killed");
|
||||
end = baseIndex.getDefIndex();
|
||||
SeenDefUse = true;
|
||||
break;
|
||||
} else if (mi->modifiesRegister(interval.reg, tri_)) {
|
||||
// Another instruction redefines the register before it is ever read.
|
||||
// Then the register is essentially dead at the instruction that defines
|
||||
// it. Hence its interval is:
|
||||
// [defSlot(def), defSlot(def)+1)
|
||||
DEBUG(dbgs() << " dead");
|
||||
end = start.getStoreIndex();
|
||||
SeenDefUse = true;
|
||||
break;
|
||||
}
|
||||
if (mi->isDebugValue()) {
|
||||
++mi;
|
||||
continue;
|
||||
}
|
||||
if (mi->killsRegister(interval.reg, tri_)) {
|
||||
DEBUG(dbgs() << " killed");
|
||||
end = baseIndex.getDefIndex();
|
||||
SeenDefUse = true;
|
||||
break;
|
||||
} else if (mi->modifiesRegister(interval.reg, tri_)) {
|
||||
// Another instruction redefines the register before it is ever read.
|
||||
// Then the register is essentially dead at the instruction that defines
|
||||
// it. Hence its interval is:
|
||||
// [defSlot(def), defSlot(def)+1)
|
||||
DEBUG(dbgs() << " dead");
|
||||
end = start.getStoreIndex();
|
||||
SeenDefUse = true;
|
||||
break;
|
||||
}
|
||||
|
||||
++mi;
|
||||
if (mi != E && !mi->isDebugValue()) {
|
||||
baseIndex = indexes_->getNextNonNullIndex(baseIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user