[haskell-llvm] llvm-general FFI dependencies

Benjamin Scarlet roll10 at greynode.net
Tue Aug 20 12:23:31 BST 2013


There's some TableGen documentation here:

http://llvm.org/docs/TableGenFundamentals.html



On Aug 20, 2013, at 5:31 AM, Henning Thielemann <schlepptop at henning-thielemann.de> wrote:

> Am 20.08.2013 10:55, schrieb Scott West:
> 
>>> Is Template Haskell used for parsing
>>> the C stuff? It sounds crazy to me. So far I have used HSC for
>>> interfacing from Haskell to C. However I have no experience with
>>> automatic generation of FFI declarations using HSC.
>>> 
>> 
>> No it doesn't parse the C stuff.
>> 
>> The LLVM headers include a Instruction.def file that allows a caller to
>> #define some macros to help generate structures. TH is used from there
>> to generate some Haskell foreign declarations.
> 
> LLVM has this mysterious TableGen system for generating all kinds of files from Def files. It seems to be undocumented and LLVM people claim it is easy to understand. I tried to use it for automatically generating Haskell declarations for vector instruction intrinsics. Unfortunately I did not understand this TableGen system.
> 
> Maybe one should try harder to use that system since it is what the def-files are made for.
> 
> 
>> I admit that this is not a huge concern for me. In particular, the time
>> is already invested in the TH solution, so switching away from it will
>> cost now or later, probably about the same. Given that so far there
>> isn't a great call to get it working on the other compilers, its hard to
>> justify putting in the effort.
> 
> The question for me is, whether I should invest into porting my code to llvm-general-ffi. In the current state I would prefer to stay with llvm-base as is.
> 
> 
> _______________________________________________
> Haskell-llvm mailing list
> Haskell-llvm at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-llvm




More information about the Haskell-llvm mailing list