[LLVMdev] great (detailed) article about GHC + LLVM

Chris Lattner clattner at apple.com
Tue Feb 23 10:04:25 PST 2010

On Feb 23, 2010, at 1:49 AM, Renato Golin wrote:

> On 22 February 2010 19:43, Chris Lattner <clattner at apple.com> wrote:
>> I found this interesting:
>> http://donsbot.wordpress.com/2010/02/21/smoking-fast-haskell-code-using-ghcs-new-llvm-codegen/
> David Terei sent it a few days ago too, as part of another thread.
> (which prevented me of sharing too) ;)
> It's really interesting how the optimizations scrambled the code to a
> point of non-recognition, but making it much faster. Are the generic
> optimizations (also) tailored towards functional programming or was it
> just coincidence/luck?

Just coincidence.  A better way of looking at it is that the generic optimizations are tailored to produce code that runs fast on a given CPU.  While it is still clearly important to do language specific or language directed optimizations, one goal of LLVM is to support many languages well.  I suspect that if we spent real time tuning code coming out of GHC that LLVM could do even better,


More information about the llvm-dev mailing list