Re: Understanding core2core optimisation pipeline

2014-10-31 Thread Jan Stolarek
Thanks guys. I've read the wiki page about demand analysis and things start to make a bit more sense now. 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 I'm

Re: Understanding core2core optimisation pipeline

2014-10-31 Thread Jan Stolarek
What would be the value of knowing that it is definitely used multiple times? I'm working on core-to-core optimisation that improves code when something is used multiple times. I fear that in practice it might not be beneficial to transform thing that are used just once. Janek

Re: Understanding core2core optimisation pipeline

2014-10-31 Thread Jan Stolarek
Thank you for answers. As people respond on this thread, would you be willing to capture what you learn in a wiki page in the Commentary? I already created such a wiki page some time ago: https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Core2CorePipeline But, since there are things

RE: Understanding core2core optimisation pipeline

2014-10-31 Thread Simon Peyton Jones
| And if we don't import anything then we're assuming NoOneShotInfo, | which means we don't float in past lambdas? correct ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

Re: Understanding core2core optimisation pipeline

2014-10-30 Thread Jan Stolarek
I'm resurrecting this 3-month old thread as I have some more questions about cardinality analysis. 1. I'm still a bit confused about terminology. Demand analysis, strictness analysis, cardinality analysis - do these three terms mean exactly the same thing? If no, then what are the

Re: Understanding core2core optimisation pipeline

2014-10-30 Thread Nicolas Frisby
I implemented -flate-dmd-anal last year Here's some outdated notes about my initial implementation. I share it in order to indicate what thoughts were in my mind at the time (eg re motivation). https://ghc.haskell.org/trac/ghc/wiki/Frisby2013Q1#LateStrictnessWW Aha! More up-to-date info here,

Re: Understanding core2core optimisation pipeline

2014-10-30 Thread David Feuer
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

Re: Understanding core2core optimisation pipeline

2014-10-30 Thread Nicolas Frisby
On Thu, Oct 30, 2014 at 9:55 AM, David Feuer david.fe...@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

Understanding core2core optimisation pipeline

2014-07-24 Thread Jan Stolarek
Devs, I'm trying to understand how the core2core pipeline works. Sadly, we don't have a wiki page about this so the only source of information are the papers and the source code. Papers give pretty much detail about each transformation in separate but none of the papers gives a comprehensive

RE: Understanding core2core optimisation pipeline

2014-07-24 Thread Simon Peyton Jones
| My plan is to gather up | the answers on a wiki page. Excellent -- please do that! My replies are below Simon | This mail basically asks just one question: what is the order of | optimizations pefromed on Core? It's entirely defined by SimplCore.getCoreToDo :: DynFlags - [CoreToDo] The