[project @ 2001-12-10 13:54:35 by simonmar]
authorsimonmar <unknown>
Mon, 10 Dec 2001 13:54:35 +0000 (13:54 +0000)
committersimonmar <unknown>
Mon, 10 Dec 2001 13:54:35 +0000 (13:54 +0000)
Don't force the IdInfo of a variable *occurrence* in exprSize, just
the binding sites should be enough.

ghc/compiler/coreSyn/CoreUtils.lhs

index 4e61e83..6fafd53 100644 (file)
@@ -1019,7 +1019,7 @@ coreBindsSize bs = foldr ((+) . bindSize) 0 bs
 exprSize :: CoreExpr -> Int
        -- A measure of the size of the expressions
        -- It also forces the expression pretty drastically as a side effect
-exprSize (Var v)       = varSize v 
+exprSize (Var v)       = v `seq` 1
 exprSize (Lit lit)     = lit `seq` 1
 exprSize (App f a)     = exprSize f + exprSize a
 exprSize (Lam b e)     = varSize b + exprSize e