GHC.Core.Opt.DmdAnal

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Core.Opt.DmdAnal

Synopsis

- data DmdAnalOpts = DmdAnalOpts {
  - dmd_strict_dicts :: !Bool
  - dmd_do_boxity :: !Bool
  - dmd_unbox_width :: !Int
  - dmd_max_worker_args :: !Int
  }
- dmdAnalProgram :: DmdAnalOpts -> FamInstEnvs -> [CoreRule] -> CoreProgram -> CoreProgram

# 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 laziness (cf Note [Stamp out space leaks in demand analysis])