mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
Don't try to verify LiveIntervals for physical registers.
When a physical register is in use, some alias of that register has a live interval with a relevant live range. That is the sad state of intervals after physreg coalescing of subregs, and it is good enough for correct register allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -630,8 +630,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
|||||||
else
|
else
|
||||||
addRegWithSubRegs(regsDefined, Reg);
|
addRegWithSubRegs(regsDefined, Reg);
|
||||||
|
|
||||||
// Check LiveInts for a live range.
|
// Check LiveInts for a live range, but only for virtual registers.
|
||||||
if (LiveInts && !LiveInts->isNotInMIMap(MI)) {
|
if (LiveInts && TargetRegisterInfo::isVirtualRegister(Reg) &&
|
||||||
|
!LiveInts->isNotInMIMap(MI)) {
|
||||||
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getDefIndex();
|
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getDefIndex();
|
||||||
if (LiveInts->hasInterval(Reg)) {
|
if (LiveInts->hasInterval(Reg)) {
|
||||||
const LiveInterval &LI = LiveInts->getInterval(Reg);
|
const LiveInterval &LI = LiveInts->getInterval(Reg);
|
||||||
@ -642,16 +643,11 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
|||||||
*OS << "Valno " << LR->valno->id << " is not defined at "
|
*OS << "Valno " << LR->valno->id << " is not defined at "
|
||||||
<< DefIdx << " in " << LI << '\n';
|
<< DefIdx << " in " << LI << '\n';
|
||||||
}
|
}
|
||||||
if (LR->start != DefIdx) {
|
|
||||||
report("Live range doesn't start at def", MO, MONum);
|
|
||||||
LR->print(*OS);
|
|
||||||
*OS << " should start at " << DefIdx << " in " << LI << '\n';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
report("No live range at def", MO, MONum);
|
report("No live range at def", MO, MONum);
|
||||||
*OS << DefIdx << " is not live in " << LI << '\n';
|
*OS << DefIdx << " is not live in " << LI << '\n';
|
||||||
}
|
}
|
||||||
} else if (TargetRegisterInfo::isVirtualRegister(Reg)) {
|
} else {
|
||||||
report("Virtual register has no Live interval", MO, MONum);
|
report("Virtual register has no Live interval", MO, MONum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user