From 77b99dc38036e2908101984c8394ac16f6daa4e0 Mon Sep 17 00:00:00 2001 From: "Ben.Lippmeier@anu.edu.au" Date: Thu, 23 Aug 2007 12:10:09 +0000 Subject: [PATCH] Handle DOA vregs when building spill stats --- compiler/nativeGen/RegAllocStats.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/nativeGen/RegAllocStats.hs b/compiler/nativeGen/RegAllocStats.hs index 015453e..798af02 100644 --- a/compiler/nativeGen/RegAllocStats.hs +++ b/compiler/nativeGen/RegAllocStats.hs @@ -176,8 +176,10 @@ pprStatsLifeConflict stats graph = let lifeMap = foldl' plusUFM emptyUFM [ raLifetimes s | s@RegAllocStatsStart{} <- stats ] - scatter = map (\r -> let Just (_, lifetime) = lookupUFM lifeMap r - Just node = Color.lookupNode graph r + scatter = map (\r -> let lifetime = case lookupUFM lifeMap r of + Just (_, l) -> l + Nothing -> 0 + Just node = Color.lookupNode graph r in parens $ hcat $ punctuate (text ", ") [ doubleQuotes $ ppr $ Color.nodeId node , ppr $ sizeUniqSet (Color.nodeConflicts node) -- 1.7.10.4