ghc-9.6.0.20230111: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Core.Unfold.Make

Description

Unfolding creation

Synopsis

Documentation

noUnfolding :: Unfolding Source #

There is no known Unfolding

mkInlineUnfoldingWithArity :: SimpleOpts -> UnfoldingSource -> Arity -> CoreExpr -> Unfolding Source #

Make an INLINE unfolding that will be used once the RHS has been saturated to the given arity.

mkInlineUnfoldingNoArity :: SimpleOpts -> UnfoldingSource -> CoreExpr -> Unfolding Source #

Make an INLINE unfolding that may be used unsaturated (ug_unsat_ok = unSaturatedOk) and that is reported as having its manifest arity (the number of outer lambdas applications will resolve before doing any work).

mkCompulsoryUnfolding :: CoreExpr -> Unfolding Source #

Used for things that absolutely must be unfolded

mkCompulsoryUnfolding' :: SimpleOpts -> CoreExpr -> Unfolding Source #

Same as mkCompulsoryUnfolding but simplifies the unfolding first

certainlyWillInline :: UnfoldingOpts -> IdInfo -> CoreExpr -> Maybe Unfolding Source #

Sees if the unfolding is pretty certain to inline. If so, return a *stable* unfolding for it, that will always inline. The CoreExpr is the WW'd and simplified RHS. In contrast, the unfolding template might not have been WW'd yet.