From e67b70d809759992485df33378ef6ade7b604e45 Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 24 Oct 2001 08:34:53 +0000 Subject: [PATCH] [project @ 2001-10-24 08:34:53 by simonpj] Part of previous WorkWrap commit --- ghc/compiler/coreSyn/CoreUnfold.lhs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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 -- 1.7.10.4