From: simonpj Date: Wed, 24 Oct 2001 08:34:53 +0000 (+0000) Subject: [project @ 2001-10-24 08:34:53 by simonpj] X-Git-Tag: Approximately_9120_patches~727 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e67b70d809759992485df33378ef6ade7b604e45;p=ghc-hetmet.git [project @ 2001-10-24 08:34:53 by simonpj] Part of previous WorkWrap commit --- diff --git a/ghc/compiler/coreSyn/CoreUnfold.lhs b/ghc/compiler/coreSyn/CoreUnfold.lhs index 7412f0d..2f5a643 100644 --- a/ghc/compiler/coreSyn/CoreUnfold.lhs +++ b/ghc/compiler/coreSyn/CoreUnfold.lhs @@ -453,16 +453,12 @@ couldBeSmallEnoughToInline threshold rhs = case calcUnfoldingGuidance threshold UnfoldNever -> False other -> True -certainlyWillInline :: Id -> Bool - -- Sees if the Id is pretty certain to inline -certainlyWillInline v - = case idUnfolding v of - - CoreUnfolding _ _ _ is_cheap g@(UnfoldIfGoodArgs n_vals _ size _) - -> is_cheap - && size - (n_vals +1) <= opt_UF_UseThreshold - - other -> False +certainlyWillInline :: Unfolding -> Bool + -- Sees if the unfolding is pretty certain to inline +certainlyWillInline (CoreUnfolding _ _ _ is_cheap (UnfoldIfGoodArgs n_vals _ size _)) + = is_cheap && size - (n_vals +1) <= opt_UF_UseThreshold +certainlyWillInline other + = False \end{code} @okToUnfoldInHifile@ is used when emitting unfolding info into an interface