summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-06 18:04:14 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-06 18:04:14 +0000
commit775aa22da28c0ded619308fa71a9be2b16bcd19b (patch)
tree605d9419cd3727a72c039312d1ff39bc79b3272c /lib
parent55e958746901ef8c04f370e746a7538137d0bcf8 (diff)
downloadllvm-775aa22da28c0ded619308fa71a9be2b16bcd19b.tar.gz
llvm-775aa22da28c0ded619308fa71a9be2b16bcd19b.tar.bz2
llvm-775aa22da28c0ded619308fa71a9be2b16bcd19b.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineVerifier.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp
index 4b87ba53da..c8007b44bf 100644
--- a/lib/CodeGen/MachineVerifier.cpp
+++ b/lib/CodeGen/MachineVerifier.cpp
@@ -630,8 +630,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
else
addRegWithSubRegs(regsDefined, Reg);
- // Check LiveInts for a live range.
- if (LiveInts && !LiveInts->isNotInMIMap(MI)) {
+ // Check LiveInts for a live range, but only for virtual registers.
+ if (LiveInts && TargetRegisterInfo::isVirtualRegister(Reg) &&
+ !LiveInts->isNotInMIMap(MI)) {
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getDefIndex();
if (LiveInts->hasInterval(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 "
<< 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 {
report("No live range at def", MO, MONum);
*OS << DefIdx << " is not live in " << LI << '\n';
}
- } else if (TargetRegisterInfo::isVirtualRegister(Reg)) {
+ } else {
report("Virtual register has no Live interval", MO, MONum);
}
}