[fpc-devel] LLVM Backend?
Samuel Crow
samuraileumas at yahoo.com
Thu Nov 12 18:15:17 CET 2009
Hi Jonas,
----- Original Message ----
> From: Jonas Maebe <jonas.maebe at elis.ugent.be>
> To: FPC developers' list <fpc-devel at lists.freepascal.org>
> Sent: Thu, November 12, 2009 7:48:58 AM
> Subject: Re: [fpc-devel] LLVM Backend?
>
>
-snip-
> It does make a difference. Unfortunately. While working on a patch to add
> Borland fastcall support to GDB, I discovered that there's a bug in our
> implementation of Borland fastcall on Mac OS X (although I'm still not sure
> why). I'll try to fix it tonight and create a test file that you can use.
>
Thanks!
> > Also, as part of the Mattathias BASIC project, our team leader has almost
> completed the LLVM-PEG utility for implementing parsing expression grammars in
> LLVM Assembly. If I end up continuing the work I started on a new LLVM-FPC
> parser I'll be using that as my tool of choice and implementing the code
> sections with support routines from LLVM and Clang. (I won't have the liberty of
> using Clang's libraries in the BASIC compiler since BASIC requires a two-pass
> compilation process.)
>
> That's quite an undertaking!
>
LLVM does most of the work with its support routines but I expect that once we get the core language support in (including the ability to extend the language), users will help with writing a few extensions themselves.
> > I hope your workload permits you to work on the function calling mechenism
> soon. Thanks for your advice.
>
> Even once this is finished, how do you propose we pass type information from FPC
> to LLVM libraries? Via strings in LLVM assembler format? (since I've already
> written that code) Or another way?
>
There are classes to create any type documented at http://llvm.org/docs/ProgrammersManual.html#Type . As of the current 2.6 release there are now more extensive C bindings included with LLVM than were previously available. Once I get the trunk downloaded I'll see about a link to the actual documentation on how to use those C bindings.
Thanks for your help,
--Sam
More information about the fpc-devel
mailing list