Re: Two Hoopl questions

2013-08-13 Thread Simon Marlow
On 26/07/13 22:56, Edward Z. Yang wrote: Thank you Edward. I am aware of these requirements - my problem is writing the code in which these will always hold (I'm optimizing Cmm and hand-written Cmm files tend to cause many problems that don't appear in automatically generated Cmm). Having a deb

RE: Two Hoopl questions

2013-08-01 Thread Simon Peyton-Jones
e the bottom element. Simon | -Original Message- | From: Jan Stolarek [mailto:[email protected]] | Sent: 31 July 2013 17:45 | To: Edward Z. Yang | Cc: Simon Peyton-Jones; ghc-devs | Subject: Re: Two Hoopl questions | | Does Hoopl handle Bottom internally? By "Bottom" I mean the lo

Re: Two Hoopl questions

2013-07-31 Thread Edward Z. Yang
ase then what is the purpose of defining bottom in DataflowLattice? > > Janek > > - Oryginalna wiadomość - > Od: "Edward Z. Yang" > Do: "Jan Stolarek" > DW: "Simon Peyton-Jones" , "ghc-devs" > > Wysłane: wtorek, 30

Re: Two Hoopl questions

2013-07-31 Thread Jan Stolarek
predecessors. If this is really the case then what is the purpose of defining bottom in DataflowLattice? Janek - Oryginalna wiadomość - Od: "Edward Z. Yang" Do: "Jan Stolarek" DW: "Simon Peyton-Jones" , "ghc-devs" Wysłane: wtorek, 30 lipiec 20

Re: Two Hoopl questions

2013-07-31 Thread Jan Stolarek
: "Edward Z. Yang" DW: "Simon Peyton-Jones" , "ghc-devs" Wysłane: środa, 31 lipiec 2013 10:00:51 Temat: Re: Two Hoopl questions For some reason they are ignored, or at least the rewritten code looks as if only a single pass was done. I have facts

Re: Two Hoopl questions

2013-07-31 Thread Jan Stolarek
is. I'm puzzled. Where did I go wrong? Janek - Oryginalna wiadomość - Od: "Edward Z. Yang" Do: "Jan Stolarek" DW: "Simon Peyton-Jones" , "ghc-devs" Wysłane: wtorek, 30 lipiec 2013 20:40:53 Temat: Re: Two Hoopl questions What happens when you p

Re: Two Hoopl questions

2013-07-30 Thread Edward Z. Yang
What happens when you put a loop in your code? Edward Excerpts from Jan Stolarek's message of Tue Jul 30 08:34:44 -0700 2013: > I'll allow myself to ask my second question again: > > 2) In my algorithm I need to initialize all of the blocks in a graph with > bottom element of a lattice, except

Re: Two Hoopl questions

2013-07-30 Thread Jan Stolarek
I'll allow myself to ask my second question again: 2) In my algorithm I need to initialize all of the blocks in a graph with bottom element of a lattice, except for the entry block, which needs some other initial values. I've written something like this: cmmCopyPropagation dflags graph = do

Re: Two Hoopl questions

2013-07-27 Thread Jan Stolarek
> it's the analysis that is going bad on you. Well, I have had some problems with rewriting functions as well. > Instead, simply arrange give an extra "fuel" counter to function 'loop' > line 603 of Compiler.Hoopl.Dataflow. Thanks! Janek ___ ghc-devs m

RE: Two Hoopl questions

2013-07-26 Thread Simon Peyton-Jones
Yes it'll generate two uniques. I think that's fine. Simon | -Original Message- | From: ghc-devs [mailto:[email protected]] On Behalf Of Jan Stolarek | Sent: 26 July 2013 16:56 | To: ghc-devs | Subject: Re: Two Hoopl questions | | OK, let's make

RE: Two Hoopl questions

2013-07-26 Thread Simon Peyton-Jones
[email protected]] On Behalf Of Jan Stolarek | Sent: 26 July 2013 22:48 | To: Edward Z. Yang | Cc: ghc-devs | Subject: Re: Two Hoopl questions | | Thank you Edward. I am aware of these requirements - my problem is writing the | code in which these | will always hold (I'm optimizing Cmm a

Re: Two Hoopl questions

2013-07-26 Thread Edward Z. Yang
> Thank you Edward. I am aware of these requirements - my problem is writing > the code in which these > will always hold (I'm optimizing Cmm and hand-written Cmm files tend to cause > many problems that > don't appear in automatically generated Cmm). Having a debugging tool in form > of Fuel

Re: Two Hoopl questions

2013-07-26 Thread Jan Stolarek
Thank you Edward. I am aware of these requirements - my problem is writing the code in which these will always hold (I'm optimizing Cmm and hand-written Cmm files tend to cause many problems that don't appear in automatically generated Cmm). Having a debugging tool in form of Fuel would be he

Re: Two Hoopl questions

2013-07-26 Thread Edward Z. Yang
Hello Jan, Re (1), there is an important invariant that your transformations should uphold to avoid infinite loops. This invariant is described in the Hoopl paper: > • The lattice must have no infinite ascending chains; that is, > every sequence of calls to fact_join must eventually return > NoC

Re: Two Hoopl questions

2013-07-26 Thread Jan Stolarek
OK, let's make it "Three Hoopl questions". 3) Consider this rewriting function: cpRwMiddle dflags (CmmStore lhs rhs) _ = do u <- getUniqueUs let regSize = cmmExprType dflags rhs newReg = CmmLocal $ LocalReg u regSize newRegAssign = CmmAssign newReg rhs newMemAssig