mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-21 03:37:47 +00:00
Stop using LiveRange in MachineVerifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
43b04fa17e
commit
ed8263553a
@ -636,11 +636,11 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
||||
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getDefIndex();
|
||||
if (LiveInts->hasInterval(Reg)) {
|
||||
const LiveInterval &LI = LiveInts->getInterval(Reg);
|
||||
if (const LiveRange *LR = LI.getLiveRangeContaining(DefIdx)) {
|
||||
assert(LR->valno && "NULL valno is not allowed");
|
||||
if (LR->valno->def != DefIdx) {
|
||||
if (const VNInfo *VNI = LI.getVNInfoAt(DefIdx)) {
|
||||
assert(VNI && "NULL valno is not allowed");
|
||||
if (VNI->def != DefIdx) {
|
||||
report("Inconsistent valno->def", MO, MONum);
|
||||
*OS << "Valno " << LR->valno->id << " is not defined at "
|
||||
*OS << "Valno " << VNI->id << " is not defined at "
|
||||
<< DefIdx << " in " << LI << '\n';
|
||||
}
|
||||
} else {
|
||||
@ -889,9 +889,9 @@ void MachineVerifier::verifyLiveIntervals() {
|
||||
for (LiveInterval::const_vni_iterator I = LI.vni_begin(), E = LI.vni_end();
|
||||
I!=E; ++I) {
|
||||
VNInfo *VNI = *I;
|
||||
const LiveRange *DefLR = LI.getLiveRangeContaining(VNI->def);
|
||||
const VNInfo *DefVNI = LI.getVNInfoAt(VNI->def);
|
||||
|
||||
if (!DefLR) {
|
||||
if (!DefVNI) {
|
||||
if (!VNI->isUnused()) {
|
||||
report("Valno not live at def and not marked unused", MF);
|
||||
*OS << "Valno #" << VNI->id << " in " << LI << '\n';
|
||||
@ -902,28 +902,27 @@ void MachineVerifier::verifyLiveIntervals() {
|
||||
if (VNI->isUnused())
|
||||
continue;
|
||||
|
||||
if (DefLR->valno != VNI) {
|
||||
if (DefVNI != VNI) {
|
||||
report("Live range at def has different valno", MF);
|
||||
DefLR->print(*OS);
|
||||
*OS << " should use valno #" << VNI->id << " in " << LI << '\n';
|
||||
*OS << "Valno #" << VNI->id << " is defined at " << VNI->def
|
||||
<< " where valno #" << DefVNI->id << " is live.\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (LiveInterval::const_iterator I = LI.begin(), E = LI.end(); I!=E; ++I) {
|
||||
const LiveRange &LR = *I;
|
||||
assert(LR.valno && "Live range has no valno");
|
||||
const VNInfo *VNI = I->valno;
|
||||
assert(VNI && "Live range has no valno");
|
||||
|
||||
if (LR.valno->id >= LI.getNumValNums() ||
|
||||
LR.valno != LI.getValNumInfo(LR.valno->id)) {
|
||||
if (VNI->id >= LI.getNumValNums() || VNI != LI.getValNumInfo(VNI->id)) {
|
||||
report("Foreign valno in live range", MF);
|
||||
LR.print(*OS);
|
||||
I->print(*OS);
|
||||
*OS << " has a valno not in " << LI << '\n';
|
||||
}
|
||||
|
||||
if (LR.valno->isUnused()) {
|
||||
if (VNI->isUnused()) {
|
||||
report("Live range valno is marked unused", MF);
|
||||
LR.print(*OS);
|
||||
I->print(*OS);
|
||||
*OS << " in " << LI << '\n';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user