Re: patch applied (ghc): NCG: Really avoid the need for memory-to-memory moves in the register allocator

Wolfgang Thaller <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <606EB7D0-299A-4F14-8F3D-0DF4D15F0215__35508.4125920714$1164574215$gmane$org@gmx.net>
> what about code generated for classic fac benchmark:
>
> fac 0 res = res
> fac n res = fac (n-1) (n*res)

This isn't really related to my patch; my patch affects hand-written  
loops in .cmm files (in the run-time system); the goal for now is to  
make them compile at all, not to make them run as efficiently as  
possible. For Haskell code, GHC doesn't currently pass loops to the  
native code generator.
Also, if the above code, specialised to Int, is optimised properly,  
it shouldn't need any register spilling by the register allocator.

Cheers,

Wolfgang
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.