Hacker News new | past | comments | ask | show | jobs | submit login

> ... tried the LLVM backend, but it generated significantly worse assembly code.

It's worth noting the LLVM version Neil tried was 2.8, from Dec 2010. LLVM has come a long way since then and I'd be surprised to see if produce such horrible code. I'm hoping Neil will do an updated post using LLVM 3.4 released last week.




My understanding is that the main problem is translating from Haskell to LLVM IR is a lossy process, not the difference between LLVM 2.8 and LLVM 3.4. This blog post demonstrates one such issue:

http://blog.omega-prime.co.uk/?p=135

Quote: "In particular, LLVM conservatively assumes that GHC's stack and the heap may alias". LLVM has to assume that short of Haskell-specific analysis, so updating to LLVM 3.4 won't help with such issues.


not quite, I think the issue is that llvm doesn't understand ghc's stack, so which I guess is the same issue :)




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: