Understanding core2core optimisation pipeline
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs