+checkSize :: Id -> CoreExpr
+ -> UniqSM [(Id,CoreExpr)] -> UniqSM [(Id,CoreExpr)]
+ -- See Note [Don't w/w inline things (a) and (b)]
+checkSize fn_id rhs thing_inside
+ | isStableUnfolding unfolding -- For DFuns and INLINE things, leave their
+ = return [ (fn_id, rhs) ] -- unfolding unchanged; but still attach
+ -- strictness info to the Id
+
+ | certainlyWillInline unfolding
+ = return [ (fn_id `setIdUnfolding` inline_rule, rhs) ]
+ -- Note [Don't w/w inline things (b)]
+
+ | otherwise = thing_inside
+ where
+ unfolding = idUnfolding fn_id
+ inline_rule = mkInlineRule InlUnSat rhs (unfoldingArity unfolding)
+
+---------------------
+splitFun :: Id -> IdInfo -> [Demand] -> DmdResult -> Activation -> Expr Var
+ -> UniqSM [(Id, CoreExpr)]
+splitFun fn_id fn_info wrap_dmds res_info inline_act rhs