X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAlloc%2FLinear%2FMain.hs;h=473b549a149845943464aef5d5d6775634b97a34;hb=8419203b7eb5aa4bb13f8d1263632de4d10a4048;hp=c181f0e3c42a622595538fca7aa143e4dcfc1307;hpb=06bf361cae4364f7f568688d30d22a4a3fc914ec;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs index c181f0e..473b549 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Main.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs @@ -621,7 +621,14 @@ allocateRegsAndSpill reading keep spills alloc (r:rs) -- Not already in a register, so we need to find a free one... Just (InMem slot) | reading -> doSpill (ReadMem slot) | otherwise -> doSpill WriteMem - Nothing | reading -> panic "allocateRegsAndSpill: Cannot read from uninitialized register" + Nothing | reading -> + -- pprPanic "allocateRegsAndSpill: Cannot read from uninitialized register" (ppr r) + -- ToDo: This case should be a panic, but we + -- sometimes see an unreachable basic block which + -- triggers this because the register allocator + -- will start with an empty assignment. + doSpill WriteNew + | otherwise -> doSpill WriteNew