From 65ba95ebf9a8b71c62c2acf20a0019d30536a025 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Tue, 11 Sep 2012 12:34:27 +0000 Subject: Stack Coloring: Dont crash on dbg values which use stack frames. llvm-svn: 163616 --- llvm/lib/CodeGen/StackColoring.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index dbfa4bb22bc..6df932c1ae0 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/lib/CodeGen/StackColoring.cpp @@ -523,10 +523,12 @@ void StackColoring::remapInstructions(DenseMap &SlotRemap) { // the calculated range then it means that the alloca usage moved // outside of the lifetime markers. #ifndef NDEBUG - SlotIndex Index = Indexes->getInstructionIndex(I); - LiveInterval* Interval = Intervals[FromSlot]; - assert(Interval->find(Index) != Interval->end() && + if (!I->isDebugValue()) { + SlotIndex Index = Indexes->getInstructionIndex(I); + LiveInterval* Interval = Intervals[FromSlot]; + assert(Interval->find(Index) != Interval->end() && "Found instruction usage outside of live range."); + } #endif // Fix the machine instructions. -- cgit v1.2.3