Re: 4221 on new codegen

2011-02-04 Thread ezyang
Excerpts from Simon Marlow's message of Fri Feb 04 03:33:11 -0500 2011: > Yes, I think starting work on the cleanup would be worthwhile at this > stage. It'll be much easier to dig around in the code to find the bugs > once all the cruft has gone. Well, I rolled up my sleeves intending to do th

Re: 4221 on new codegen

2011-02-04 Thread Simon Marlow
On 03/02/2011 22:41, ezyang wrote: Assuming that runFuelIO is the only mechanism by which fueled execution is performed, the only file using fuel is CmmCPS.hs. This file performs: 1. Proc point analysis 2. Proc point transformation 3. Spills and reloads 4. Late reloads

Re: 4221 on new codegen

2011-02-03 Thread ezyang
Assuming that runFuelIO is the only mechanism by which fueled execution is performed, the only file using fuel is CmmCPS.hs. This file performs: 1. Proc point analysis 2. Proc point transformation 3. Spills and reloads 4. Late reloads 5. Dead assignment elimination 6. Stub

Re: 4221 on new codegen

2011-02-03 Thread Simon Marlow
On 03/02/2011 10:07, ezyang wrote: Excerpts from Simon Marlow's message of Thu Feb 03 04:05:04 -0500 2011: I wonder if the fuel is also being used by "essential" transformations, like the CPS pass? That seems likely. Shall I try to figure out what the essential transformations are and give the

Re: 4221 on new codegen

2011-02-03 Thread ezyang
Excerpts from Simon Marlow's message of Thu Feb 03 04:05:04 -0500 2011: > I wonder if the fuel is also being used by "essential" transformations, > like the CPS pass? That seems likely. Shall I try to figure out what the essential transformations are and give them infinite fuel? Edward

Re: 4221 on new codegen

2011-02-03 Thread Simon Marlow
.edu] | Sent: 02 February 2011 23:12 | To: Simon Marlow; Simon Peyton-Jones | Cc: glasgow-haskell-users | Subject: Re: 4221 on new codegen | | Simon Peyton Jones, I have a question about optimization fuel and GHC panics. | When I vary the fuel using -dopt-fuel, I get the following varying behavior: | |

RE: 4221 on new codegen

2011-02-03 Thread Simon Peyton-Jones
oduces the crash. Well that's the intent anyway! Simon | -Original Message- | From: ezyang [mailto:ezy...@mit.edu] | Sent: 02 February 2011 23:12 | To: Simon Marlow; Simon Peyton-Jones | Cc: glasgow-haskell-users | Subject: Re: 4221 on new codegen | | Simon Peyton Jones, I have a

Re: 4221 on new codegen

2011-02-02 Thread ezyang
Here is an example of a very simple program getting strange results on low fuel: main = do putStrLn "a" f putStrLn "b" f = putStrLn "c" ezyang@javelin:~/Dev/ghc-build-nco-default/testsuite/tests/ghc-regress/simple$ '/home/ezyang/Dev/ghc-build-nco-default/inplace/bin/ghc-stage2' -fforc

Re: 4221 on new codegen

2011-02-02 Thread ezyang
Simon Peyton Jones, I have a question about optimization fuel and GHC panics. When I vary the fuel using -dopt-fuel, I get the following varying behavior: ... -dopt-fuel=144 = normal segfault (late in the program) -dopt-fuel=143 = segfaults ~immediately -dopt-fuel=142 = normal segfault -dopt-f

Re: 4221 on new codegen

2011-02-02 Thread Simon Marlow
On 02/02/2011 00:29, Edward Z. Yang wrote: More Hoopling later, I see this segment in the rewrite function: middle m@(CmmUnsafeForeignCall _ fs _) live = return $ case map spill (filter (flip elemRegSet (on_stack live)) fs) ++ map reload (uniqSetToList (kill fs (in

Re: 4221 on new codegen

2011-02-01 Thread Edward Z. Yang
More Hoopling later, I see this segment in the rewrite function: middle m@(CmmUnsafeForeignCall _ fs _) live = return $ case map spill (filter (flip elemRegSet (on_stack live)) fs) ++ map reload (uniqSetToList (kill fs (in_regs live))) of [] -> Nothing

Re: 4221 on new codegen

2011-02-01 Thread Simon Marlow
On 01/02/2011 00:01, Edward Z. Yang wrote: Current theory: c1jj: _s1ep::I32 = I32[(slot<_s1ep::I32> + 4)]; // CmmAssign _s1fP::I32 = I32[(slot<_s1fP::I32> + 4)]; // CmmAssign // outOfLine should follow: _s1eq::F64 = F64[_s1fP::I32 + 3]; // CmmAssign

Re: 4221 on new codegen

2011-01-31 Thread Edward Z. Yang
Current theory: c1jj: _s1ep::I32 = I32[(slot<_s1ep::I32> + 4)]; // CmmAssign _s1fP::I32 = I32[(slot<_s1fP::I32> + 4)]; // CmmAssign // outOfLine should follow: _s1eq::F64 = F64[_s1fP::I32 + 3]; // CmmAssign I32[(young + 4)] = c1jh; // CmmStore foreign