Understanding core2core optimisation pipeline

David Feuer david.feuer at gmail.com
Thu Oct 30 16:55:18 UTC 2014


On Thu, Oct 30, 2014 Jan Stolarek wrote:

>
> 2. First pass of full laziness is followed by floating in. At that stage
> we have not yet run the
> demand analysis and yet the code that does the floating-in checks whether
> a binder is one-shot
> (FloatIn.okToFloatInside called by FloatIn.fiExpr AnnLam case). This
> suggests that cardinality
> analysis is done earlier (but when?) and that demand analysis is not the
> same thing as
> cardinality analysis.
>

If you're looking at super-recent code, that could be Joachim Breitner's
work. He's exposed the one-shot stuff at the Haskell level with the
experimental magic oneShot function, intended primarily for use in the
libraries to make foldl-as-foldr and related things be analyzed more
reliably. The old GHC arity analysis combined with his Call Arity get
almost everything right, but there are occasional corner cases where things
go wrong, and when they do the results tend to be extremely bad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141030/6c8c6783/attachment.html>


More information about the ghc-devs mailing list