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

GHC.Core.Opt.DmdAnal

Synopsis

Documentation

data DmdAnalOpts Source #

Options for the demand analysis

Constructors

DmdAnalOpts 

Fields

  • dmd_strict_dicts :: !Bool

    Value of `-fdicts-strict` (on by default). When set, all functons are implicitly strict in dictionary args.

  • dmd_do_boxity :: !Bool

    Governs whether the analysis should update boxity signatures. See Note [Don't change boxity without worker/wrapper].

  • dmd_unbox_width :: !Int

    Value of `-fdmd-unbox-width`. See Note [Unboxed demand on function bodies returning small products]

  • dmd_max_worker_args :: !Int

    Value of `-fmax-worker-args`. Don't unbox anything if we end up with more than this many args.

dmdAnalProgram :: DmdAnalOpts -> FamInstEnvs -> [CoreRule] -> CoreProgram -> CoreProgram Source #

Outputs a new copy of the Core program in which binders have been annotated with demand and strictness information.

Note: use seqBinds on the result to avoid leaks due to lazyness (cf Note [Stamp out space leaks in demand analysis])