
has anyone ever considered using llvm as a infrastructure for haskell compilation? it wold seem people are looking at building frontends for scheme, ocaml, etc. i don't know if an alternate backend is appropriate, but it would seem to be an interesting way to aggregate the best thinking for various optimizations over a more diverse group of developers.

clawsie:
has anyone ever considered using llvm as a infrastructure for haskell compilation? it wold seem people are looking at building frontends for scheme, ocaml, etc. i don't know if an alternate backend is appropriate, but it would seem to be an interesting way to aggregate the best thinking for various optimizations over a more diverse group of developers.
People are definitely interested in it. Needs some people with compiler experience and GHC experience to tackle it seriously, I suspect. -- Don

On Thu, 2007-09-13 at 15:58 -0700, Don Stewart wrote:
clawsie:
has anyone ever considered using llvm as a infrastructure for haskell compilation? it wold seem people are looking at building frontends for scheme, ocaml, etc. i don't know if an alternate backend is appropriate, but it would seem to be an interesting way to aggregate the best thinking for various optimizations over a more diverse group of developers.
People are definitely interested in it. Needs some people with compiler experience and GHC experience to tackle it seriously, I suspect.
Reading and writing llvm files could also be useful to prototype/implement compiler passes using Haskell. / Thomas

On Thu, 2007-09-13 at 15:55 -0700, brad clawsie wrote:
has anyone ever considered using llvm as a infrastructure for haskell compilation? it wold seem people are looking at building frontends for scheme, ocaml, etc. i don't know if an alternate backend is appropriate, but it would seem to be an interesting way to aggregate the best thinking for various optimizations over a more diverse group of developers.
I applied for Google Summer of Code with the suggestion to write a library to generate (and compile) LLVM code (not my idea in the first place, but I liked it), but it didn't get into the top 9 (i.e., funded) projects. It's certainly not a bad idea, but the immediate use to the community would admittedly not be too great. Targeting an existing Haskell compiler would probably be doable, but I am unsure what the big advantages would be. Many optimizations implemented for llvm are more high-level in nature and wouldn't make much sense for Haskell compilers, since translating to llvm would lose some information, and Haskell, being a lazy language, requires/enables non-standard transformations. Haskell-compilers currently require better low-level optimizations (instruction scheduling, register allocation, maybe memory locality optimazitions). I'm not up to date with how well llvm scores in these areas, but last time I checked it was slower than ghc, and ghc already isn't too great at this kind of stuff (compared to icc). I could however see some applications of an llvm-generation library for DSLs that require high performance, and currently have to invoke gcc at runtime. / Thomas

I could see it as a useful abstraction instead of directly generating
assembly. To me the idea behind llvm seems nice and clean and academic to a
certain degree. It can see it as something to look out for in the future.
On 9/13/07, brad clawsie
has anyone ever considered using llvm as a infrastructure for haskell compilation? it wold seem people are looking at building frontends for scheme, ocaml, etc. i don't know if an alternate backend is appropriate, but it would seem to be an interesting way to aggregate the best thinking for various optimizations over a more diverse group of developers. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
brad clawsie
-
Don Stewart
-
Ryan Dickie
-
Thomas Schilling