mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
LiveRangeCalc: Improve error messages on malformed IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37848f1ada
commit
948b20ecb3
@ -272,13 +272,19 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &UseMBB,
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (MBB->pred_empty()) {
|
if (MBB->pred_empty()) {
|
||||||
MBB->getParent()->verify();
|
MBB->getParent()->verify();
|
||||||
|
errs() << "Use of " << PrintReg(PhysReg)
|
||||||
|
<< " does not have a corresponding definition on every path:\n";
|
||||||
|
const MachineInstr *MI = Indexes->getInstructionFromIndex(Use);
|
||||||
|
if (MI != nullptr)
|
||||||
|
errs() << Use << " " << *MI;
|
||||||
llvm_unreachable("Use not jointly dominated by defs.");
|
llvm_unreachable("Use not jointly dominated by defs.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TargetRegisterInfo::isPhysicalRegister(PhysReg) &&
|
if (TargetRegisterInfo::isPhysicalRegister(PhysReg) &&
|
||||||
!MBB->isLiveIn(PhysReg)) {
|
!MBB->isLiveIn(PhysReg)) {
|
||||||
MBB->getParent()->verify();
|
MBB->getParent()->verify();
|
||||||
errs() << "The register needs to be live in to BB#" << MBB->getNumber()
|
errs() << "The register " << PrintReg(PhysReg)
|
||||||
|
<< " needs to be live in to BB#" << MBB->getNumber()
|
||||||
<< ", but is missing from the live-in list.\n";
|
<< ", but is missing from the live-in list.\n";
|
||||||
llvm_unreachable("Invalid global physical register");
|
llvm_unreachable("Invalid global physical register");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user