GHC.Core.Opt.CprAnal

ghc-9.0.2: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Core.Opt.CprAnal

Description

Constructed Product Result analysis. Identifies functions that surely return heap-allocated records on every code path, so that we can eliminate said heap allocation by performing a worker/wrapper split.

See https://www.microsoft.com/en-us/research/publication/constructed-product-result-analysis-haskell/. CPR analysis should happen after strictness analysis. See Note [Phase ordering].

# Documentation

cprAnalProgram :: DynFlags -> FamInstEnvs -> CoreProgram -> IO CoreProgram Source #