[haskell-llvm] A simplified LLVM binding
Erik de Castro Lopo
mle+hs at mega-nerd.com
Wed Oct 12 12:06:19 BST 2011
David Terei wrote:
> I wrote some simple bindings for use in GHC as Nathan pointed out. It
> pretty prints LLVM bitcode so has no dependencies on the LLVM
> libraries.
>
> The bindings are part of GHC and not a separate library but it may be
> worth changing that. Erik (who I've included in this email) has used
> these bindings for work he did on a compiler that uses LLVM. Maybe he
> has a more self-contained version of the bindings then the ones in
> GHC. Erik?
Yes, I've used David's LLVM AST definition in the Disciple compiler:
http://disciple.ouroborus.net/
and they were a pleasure to use. I managed to extract David's
code from GHC and weave it into Disciple. The files from GHC
(slightly modified) are here:
http://code.ouroborus.net/ddc/ddc-head/src/Llvm.hs
http://code.ouroborus.net/ddc/ddc-head/src/Llvm/AbsSyn.hs
http://code.ouroborus.net/ddc/ddc-head/src/Llvm/PpLlvm.hs
http://code.ouroborus.net/ddc/ddc-head/src/Llvm/Types.hs
The actual darcs repo for the DDC compiler is here:
http://code.ouroborus.net/ddc/ddc-head/
> Have a look at the bindings in GHC and if it fits your
> needs we can talk about either just copying the code or maybe biting
> the bullet and creating a proper library if there are 3 users now.
Yep, I'd be happy to see that as a separate library.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the Haskell-llvm
mailing list