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

4 views
Skip to first unread message

Chris Lattner

unread,
Feb 22, 2010, 2:43:00 PM2/22/10
to LLVM Developers Mailing List

Renato Golin

unread,
Feb 23, 2010, 4:49:43 AM2/23/10
to Chris Lattner, LLVM Developers Mailing List
On 22 February 2010 19:43, Chris Lattner <clat...@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?


cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

Chris Lattner

unread,
Feb 23, 2010, 1:04:25 PM2/23/10
to Renato Golin, LLVM Developers Mailing List

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

> On 22 February 2010 19:43, Chris Lattner <clat...@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,

-Chris

Reply all
Reply to author
Forward
0 new messages