Proposal: Improving the LLVM backend by packaging it

George Colpitts george.colpitts at gmail.com
Sat Nov 1 12:05:29 UTC 2014


I think this is a great idea. My understanding from the wiki page is that
the full plan involves:


   1. We need to *fix compatibility with recent LLVM versions*. This really
   sucks for users. *Ben Gamari* is working on this, see #9142
   <https://ghc.haskell.org/trac/ghc/ticket/9142> and ​Phab:D155
   <https://phabricator.haskell.org/D155>
   2. We need to fix up the LLVM IR generation in GHC, and fix the compiler
   driver to invoke the tools with a better set of optimizations. *Nathan
   Howell* has been wrangled into looking into this.
   3. We need to ship a pre-built version of LLVM for developers and users,
   and put them in binary distributions for major platforms. *Austin Seipp*
   could handle this.
   4. We can fix other bugs, like LLVM -split-obj support, which opens the
   way to shipping GHC with LLVM-optimized base libraries. *Reid Barton*
   expressed some interest in this.

I assume that 1. will come with 7.10.1. Is there any way we could do 3. in
one of the 7.10 releases before 7.12.1?

Basing this question on Austin's words "we *only* need opt and llc, so the
distributions can be tiny. " and "it's not actually very complicated to
implement or support, I think." :) I guess it might be more difficult than
I think but I thought it was worth asking the question as I believe 3. on
its own is worthwhile and would hopefully simplify support for LLVM in GHC.

Thanks
George

On Fri, Oct 24, 2014 at 8:52 PM, Austin Seipp <austin at well-typed.com> wrote:

> Hi *,
>
> A few days ago a discussion on IRC occurred about the LLVM backend,
> its current status, and what we could do to make it a rock solid part
> of GHC for all our users.
>
> Needless to say, the situation right now isn't so hot: we have no
> commitment to version support, two major versions are busted, others
> are seriously buggy, and yet there are lots of things we could improve
> on.
>
> So I give you a proposal, from a few of us to you all, about improving it:
>
> https://ghc.haskell.org/trac/ghc/wiki/ImprovedLLVMBackend
>
> I won't repeat what's on the wiki page too much, but the TL;DR version
> is: we should start packaging a version of LLVM, and shipping it with
> e.g. binary distributions of GHC. It's just a lot better for everyone.
>
> I know we're normally fairly hesitant about things like this (shipping
> external dependencies), but I think it's the only sane thing to do
> here, and the situation is fairly unique in that it's not actually
> very complicated to implement or support, I think.
>
> We'd like to do this for 7.12. I've also wrangled some people to help.
> Those people know who they are (because they're CC'd), and I will now
> badger them into submission until it is fixed for 7.12.
>
> Please let me know what you think.
>
> PS. Joachim, I would be particularly interested in upstream needs for
> Debian, as I know of their standard packaging policy to not duplicate
> things.
>
> --
> Regards,
>
> Austin Seipp, Haskell Consultant
> Well-Typed LLP, http://www.well-typed.com/
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141101/2173f9e1/attachment.html>


More information about the ghc-devs mailing list