hasUnfolding, hasSomeUnfolding, neverUnfold,
couldBeSmallEnoughToInline,
- certainlyWillInline,
+ certainlyWillInline, smallEnoughToInline,
callSiteInline
) where
= is_cheap && size - (n_vals +1) <= opt_UF_UseThreshold
certainlyWillInline other
= False
+
+smallEnoughToInline :: Unfolding -> Bool
+smallEnoughToInline (CoreUnfolding _ _ _ _ (UnfoldIfGoodArgs _ _ size _))
+ = size <= opt_UF_UseThreshold
+smallEnoughToInline other
+ = False
\end{code}
%************************************************************************
| otherwise = case occ of
IAmDead -> pprTrace "callSiteInline: dead" (ppr id) False
IAmALoopBreaker -> False
- OneOcc in_lam _ _ -> (not in_lam || is_cheap) && consider_safe True
+ --OneOcc in_lam _ _ -> (not in_lam || is_cheap) && consider_safe True
other -> is_cheap && consider_safe False
-- we consider even the once-in-one-branch
-- occurrences, because they won't all have been
where
some_benefit = or arg_infos || really_interesting_cont ||
- (not is_top && (once || (n_vals_wanted > 0 && enough_args)))
+ (not is_top && ({- once || -} (n_vals_wanted > 0 && enough_args)))
-- [was (once && not in_lam)]
-- If it occurs more than once, there must be
-- something interesting about some argument, or the