From 6a099d439ea2e5ba708b88c4c095fe736329aae8 Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Wed, 1 Sep 2004 22:34:52 +0000 Subject: Give a better assertion if we see a use before a def. llvm-svn: 16135 --- llvm/lib/CodeGen/LiveVariables.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index f6d00f702ac..630477d7b65 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -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 -- cgit v1.2.3