[haskell-llvm] haskell-llvm An LLVVN backend for DDC

Thomas Schilling nominolo at googlemail.com
Wed Jun 23 19:34:05 EDT 2010


Hi Eric,

note that there is an ongoing Summer of Code project which aims to
modify the existing llvm library for this use case [1].  David
generated LLVM text files for his BSc work, but the goal is now to
actually use the LLVM API.  AFAIU the current llvm package does not
support this use case directly and one part of this GSoC project is to
add this capabilities.  Hopefully, that can take advantage of those
efforts.

Regarding your specific project, did you consider targeting a
higher-level target?  Some abstract machine, like STG maybe?  This
doesn't magically create interoperability with Haskell, but you could
re-use lots of runtime services, like concurrency and GC.

/ Thomas

[1]: http://donsbot.wordpress.com/2010/04/26/the-7-haskell-projects-in-the-google-summer-of-code/
 The 4th project.

On 24 June 2010 00:13, Erik de Castro Lopo <mle+hs at mega-nerd.com> wrote:
> Hi all,
>
> I do a some hacking on Ben Lippmeier's DDC compiler:
>
>     http://trac.haskell.org/ddc/wiki/WikiStart
>
> and with Ben's blessing, I'm interested in adding an LLVM backend which
> we hope will eventually replace the existing C backend.
>
> The main goal of this exercise is to generate object files via LLVM
> which are link compatible with the object files generated by the
> current C backend (this should help with validation, debugging and
> sanity checking).
>
> Longer term we also want to be able to boostrap the compiler, port
> it to other platforms and architectures and enable the creation of
> cross compilers, so we don't want to do anything  that will make any
> of these things more difficult than it is with the current C backend.
>
> I have read David Terei and Manuel Chakravarty's paper 'An LLVM backend for
> GHC', I have looked at the haskell llvm bindings (and the example programs)
> and read up on LLVM itself.
>
> Currently, I'm leaning towards using the haskell LLVM bindings to generate
> platform independent LLVM bytecode files and then use the llc tool (part of
> LLVM) to convert the bytecode files to native assembler which would then be
> assembled into an object file use the system assember (GNU as on Linux, Mac
> OSX and Freebsd, the only platforms we currently support).
>
> The question for the people who have more experience in this area than me
> is, does this seem like a sane and rational plan? Does anyone have any
> pointers ot tips?
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> _______________________________________________
> Haskell-llvm mailing list
> Haskell-llvm at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-llvm
>



-- 
If it looks like a duck, and quacks like a duck, we have at least to
consider the possibility that we have a small aquatic bird of the
family Anatidae on our hands.



More information about the Haskell-llvm mailing list