haskellllvmclangghcc-minus-minus

LLVM vs. C-- ; how can LLVM fundamentally not be better for Haskell than C--?


I've been excited about LLVM being low enough to model any system, and saw it as promising that Apple was adopting it; but then again Apple doesn't specifically support Haskell;

And, some think that Haskell would be better off with C--:

That LLVM'ers haven't solved the problem of zero-overhead garbage collection isn't too surprising. Solving this while staying agnostic of the data model is an open question in computer science.

-- LHC won't be using LLVM.


Solution

  • Well, there is a project at UNSW to translate GHC Core to LLVM

    Remember: it wasn't clear 10 years ago that LLVM would build up all the infrastructure C-- wasn't able to. Unfortunately, LLVM has the infrastructure for portable, optimized code, but not the infrastructure for nice high level language support, that C-- ha(s)d.

    An interesting project would be to target LLVM from C-- ...


    Update, as of GHC 7, GHC uses LLVM for code generation. Use the -fllvm flag. This has improved numerical performance for some low level programs. Otherwise, performance is similar to the old GCC backend.