[project @ 2001-10-24 08:34:53 by simonpj]
authorsimonpj <unknown>
Wed, 24 Oct 2001 08:34:53 +0000 (08:34 +0000)
committersimonpj <unknown>
Wed, 24 Oct 2001 08:34:53 +0000 (08:34 +0000)
Part of previous WorkWrap commit

ghc/compiler/coreSyn/CoreUnfold.lhs

index 7412f0d..2f5a643 100644 (file)
@@ -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