[LLVMdev] The most efficient way to compile to LLVM IR?

Nicolas Braud-Santoni nicolas at braud-santoni.eu
Thu Apr 18 00:38:00 PDT 2013


On 16/04/2013 16:09, bob zhang wrote:
>
>     To be clear you're suggesting having your frontend (say, for
>     argument's sake, written in C++) parse your toy language and then emit
>     a (say) Haskell representation of IR? Using some Haskell APIs you'll
>     write that will emit LLVM bitcode? And then running the resulting
>     Haskell program to produce your bitcode that you'll load back in to
>     LLVM to optimize/compile?
>
>  Yes, that's what I am doing, in OCaml though. Functional languages
> are excellent
> for program transformation and manipulation. Where is the
> specification for the bitcode format?
> Thanks

After reading this, I don't get whether you plan to do the parsing and
codegen in OCaml, and emit an OCaml representation of the IR.
If so, did you have a look at
http://llvm.org/docs/tutorial/OCamlLangImpl3.html ?

Regards,



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130418/d21c6bc1/attachment.sig>


More information about the llvm-dev mailing list