Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data WwOpts = MkWwOpts {}
- initWwOpts :: DynFlags -> FamInstEnvs -> WwOpts
- mkWwBodies :: WwOpts -> VarSet -> Id -> [Demand] -> Cpr -> UniqSM (Maybe WwResult)
- mkWWstr :: WwOpts -> ArgOfInlineableFun -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
- mkWorkerArgs :: Id -> Bool -> [Var] -> Type -> ([Var], [Var])
- data DataConPatContext = DataConPatContext {}
- data UnboxingDecision s
- = StopUnboxing
- | DropAbsent
- | Unbox !DataConPatContext [s]
- data ArgOfInlineableFun
- wantToUnboxArg :: FamInstEnvs -> ArgOfInlineableFun -> Type -> Demand -> UnboxingDecision Demand
- findTypeShape :: FamInstEnvs -> Type -> TypeShape
- isWorkerSmallEnough :: Int -> Int -> [Var] -> Bool
Documentation
MkWwOpts | |
|
initWwOpts :: DynFlags -> FamInstEnvs -> WwOpts Source #
mkWWstr :: WwOpts -> ArgOfInlineableFun -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr) Source #
data DataConPatContext Source #
The information needed to build a pattern for a DataCon to be unboxed.
The pattern can be generated from dcpc_dc
and dcpc_tc_args
via
dataConRepInstPat
. The coercion dcpc_co
is for newtype
wrappers.
If we get DataConPatContext dc tys co
for some type ty
and dataConRepInstPat ... dc tys = (exs, flds)
, then
dc
exs flds :: T tys@co :: T tys ~ ty
data UnboxingDecision s Source #
Describes the outer shape of an argument to be unboxed or left as-is
Depending on how s
is instantiated (e.g., Demand
or Cpr
).
StopUnboxing | We ran out of strictness info. Leave untouched. |
DropAbsent | The argument/field was absent. Drop it. |
Unbox !DataConPatContext [s] | The argument is used strictly or the returned product was constructed, so
unbox it.
The |
data ArgOfInlineableFun Source #
A specialised Bool for an argument to wantToUnboxArg
.
See Note [Do not unpack class dictionaries].
NotArgOfInlineableFun | Definitely not in an inlineable fun. |
MaybeArgOfInlineableFun | We might be in an inlineable fun, so we won't unbox dictionary args. |
Instances
Eq ArgOfInlineableFun Source # | |
Defined in GHC.Core.Opt.WorkWrap.Utils (==) :: ArgOfInlineableFun -> ArgOfInlineableFun -> Bool # (/=) :: ArgOfInlineableFun -> ArgOfInlineableFun -> Bool # |
wantToUnboxArg :: FamInstEnvs -> ArgOfInlineableFun -> Type -> Demand -> UnboxingDecision Demand Source #
Unboxing strategy for strict arguments.
findTypeShape :: FamInstEnvs -> Type -> TypeShape Source #