X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcoreSyn%2FCoreUnfold.lhs;h=0c8e6e1414d746090884989f461506489d37b69a;hb=65284c9655167101ad716863bc8db5cc8ad76a2b;hp=f27289ec0e92901d72b931252ec1e7c23f4aa760;hpb=69a603fbd27cb7286f154ee7d113e2dbcc0f80c0;p=ghc-hetmet.git diff --git a/ghc/compiler/coreSyn/CoreUnfold.lhs b/ghc/compiler/coreSyn/CoreUnfold.lhs index f27289e..0c8e6e1 100644 --- a/ghc/compiler/coreSyn/CoreUnfold.lhs +++ b/ghc/compiler/coreSyn/CoreUnfold.lhs @@ -205,7 +205,7 @@ calcUnfoldingGuidance bOMB_OUT_SIZE expr discount_for b | num_cases == 0 = 0 | is_fun_ty = num_cases * opt_UF_FunAppDiscount - | is_data_ty = num_cases * tyConFamilySize tycon * opt_UF_ScrutConDiscount + | is_data_ty = num_cases * opt_UF_ScrutConDiscount | otherwise = num_cases * opt_UF_PrimArgDiscount where num_cases = foldlBag (\n b' -> if b==b' then n+1 else n) 0 cased_args @@ -267,6 +267,7 @@ sizeExpr (I# bOMB_OUT_SIZE) args expr = nukeScrutDiscount (size_up scrut) `addSize` arg_discount scrut `addSize` foldr (addSize . size_up_alt) sizeZero alts + `addSizeN` 1 -- charge one for the case itself. -- Just charge for the alts that exist, not the ones that might exist -- `addSizeN`