Give a better assertion if we see a use before a def.

llvm-svn: 16135
This commit is contained in:
Alkis Evlogimenos 2004-09-01 22:34:52 +00:00
parent a50cb6c8b9
commit 6a099d439e
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo,
void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
MachineInstr *MI) {
assert(VRInfo.DefInst && "Register use before def!");
// Check to see if this basic block is already a kill block...
if (!VRInfo.Kills.empty() && VRInfo.Kills.back()->getParent() == MBB) {
// Yes, this register is killed in this basic block already. Increase the