Re: Post-new codegen cleanup

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
On 05/09/2012 15:03, Johan Tibell wrote:
> On Wednesday, September 5, 2012, Simon Marlow wrote:
>
>     I've started a wiki page to list the cleanup tasks we need to get
>     done now that the new codegen is enabled by default.  (since this is
>     a bit open-ended and fluid I thought a wiki page would be better
>     than a ticket for now).
>
>     http://hackage.haskell.org/__trac/ghc/wiki/Commentary/__Compiler/NewCodeGen/Cleanup
>     <http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/NewCodeGen/Cleanup>
>
>     The page is a bit sparse but we can fill in more details as we go
>     along.  I haven't done a full analysis of what needs to be done
>     before we can remove codeGen/Cg* and cmm/OldCmm yet.
>
>
>   Does the new codegen have a mini-inliner like the old one? I did a bit
> of work in the old one to make sure constants get inclined so memcpies
> can get unrolled. Might want put that on the wiki.

Ah yes, thanks for reminding me about this.

The mini-inliner has been replaced by CmmSink, a pass that does sinking 
and inlining.  In most ways it is better than the old mini-inliner 
because it can sink and inline through branches.  However, it doesn't 
currently do constant-folding and constant propagation like the old one 
did.  We still have a constant-folding pass just before code generation 
in the native code generator, but it doesn't do constant propagation.

This is on my list to fix.  I'm not sure whether it will be better to 
have a hoopl pass to do constant folding and propagation, or whether to 
do it in CmmSink.  Using hoopl would be better in every way except 
compile time.

Cheers,
	Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.