Understanding core2core optimisation pipeline

Nicolas Frisby nicolas.frisby at gmail.com
Thu Oct 30 17:37:39 UTC 2014


On Thu, Oct 30, 2014 at 9:55 AM, David Feuer <david.feuer at gmail.com> wrote:

> 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.
>
>
Joachim's work looks like neat stuff. I've only been scanning those emails,
but I recall mention of interface files. Jan, would your question #2 be
addressed by that information being imported from interface files? With
separate compilation, phase ordering because more nuanced.




> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141030/b8f51141/attachment-0001.html>


More information about the ghc-devs mailing list