Re: [fpc-devel] LLVM, interfaces and nested procedure variables

2023-11-25 Thread Jonas Maebe via fpc-devel
On 25/11/2023 13:34, Kieran via fpc-devel wrote: Thanks Jonas, I was mistakenly invoking my non-LLVM compiler. Fix pushed. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-dev

Re: [fpc-devel] LLVM, interfaces and nested procedure variables

2023-11-25 Thread Kieran via fpc-devel
Thanks Jonas, I was mistakenly invoking my non-LLVM compiler. On Sat, 25 Nov 2023 at 12:08, Jonas Maebe via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > On 25/11/2023 12:48, Kieran via fpc-devel wrote: > > I'm trying to reproduce a minimal viable demo of a problem compiling > > code using

Re: [fpc-devel] LLVM, interfaces and nested procedure variables

2023-11-25 Thread Jonas Maebe via fpc-devel
On 25/11/2023 12:48, Kieran via fpc-devel wrote: I'm trying to reproduce a minimal viable demo of a problem compiling code using the LLVM backend that has an interface with a parameter that is a nested procedure variable, but I'm not having any luck. I've noticed the difference between my test

[fpc-devel] LLVM, interfaces and nested procedure variables

2023-11-25 Thread Kieran via fpc-devel
Hi, I'm trying to reproduce a minimal viable demo of a problem compiling code using the LLVM backend that has an interface with a parameter that is a nested procedure variable, but I'm not having any luck. I've noticed the difference between my test programs and the large project where I'm seeing

[fpc-devel] LLVM backend: support for address sanitizer

2022-07-24 Thread Jonas Maebe via fpc-devel
Hi, I have added support for LLVM's address sanitizer to the LLVM backend. You can find more information here: https://wiki.freepascal.org/LLVM#Using_Address_Sanitizer_.28asan.29 It caught a couple of (minor) errors in the compiler itself while I was testing it. Jonas

Re: [fpc-devel] LLVM backend Pascal bindings?

2021-11-14 Thread Ryan Joseph via fpc-devel
> On Nov 14, 2021, at 4:58 PM, Jonas Maebe via fpc-devel > wrote: > > Afaik there's also a C binding (or at least there used to be one). There is some c bindings but they seem incomplete, or at least I couldn't figure out how to follow the tutorial using what was provided there. > >> How d

Re: [fpc-devel] LLVM backend Pascal bindings?

2021-11-14 Thread Jonas Maebe via fpc-devel
On 2021-11-14 05:58, Ryan Joseph via fpc-devel wrote: As a fun weekend project I wanted to follow along with the tutorial at https://llvm.org/docs/tutorial/index.html but I noticed the API in in C++ so it wouldn't be possible to do this in Pascal without at least some plain C API. Afaik there's

[fpc-devel] LLVM backend Pascal bindings?

2021-11-13 Thread Ryan Joseph via fpc-devel
As a fun weekend project I wanted to follow along with the tutorial at https://llvm.org/docs/tutorial/index.html but I noticed the API in in C++ so it wouldn't be possible to do this in Pascal without at least some plain C API. How did Free Pascal/Jonas accomplish this in the LLVM backend? Re

Re: [fpc-devel] LLVM code generator

2019-04-23 Thread Jonas Maebe
On 23/04/2019 19:27, Ryan Joseph wrote: Any new news on the LLVM code generator? Link-time optimization support is now also integrated in the compiler. I wanted to test this but the old link posted seems to be dead. Is there an updated link and instructions to build? Which old link? Here's

Re: [fpc-devel] LLVM code generator

2019-04-23 Thread Ryan Joseph
Any new news on the LLVM code generator? I wanted to test this but the old link posted seems to be dead. Is there an updated link and instructions to build? Regards, Ryan Joseph ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://l

Re: [fpc-devel] LLVM code generator

2019-02-24 Thread Jonas Maebe
On 24/02/2019 22:18, Florian Klämpfl wrote: Am 24.02.19 um 21:17 schrieb Jonas Maebe: Obligatory vipribench results (on gcc113.fsffrance.org, an APM X-Gene Mustang board -- that's an AArch64 board, but it can also run 32 bit ARM programs): * FPC (-O2): Time: 5107ms = 2839240 pkts/s = 4245 MB/s

Re: [fpc-devel] LLVM code generator

2019-02-24 Thread Florian Klämpfl
Am 24.02.19 um 21:17 schrieb Jonas Maebe: On 25/12/2018 19:14, Jonas Maebe wrote: On 2018-12-02 11:26, Jonas Maebe wrote: The LLVM version of the code generator has been significantly improved in the mean time: The LLVM code generator on the debug_eh branch now also works with Linux/ARM, al

Re: [fpc-devel] LLVM code generator

2019-02-24 Thread Jonas Maebe
On 25/12/2018 19:14, Jonas Maebe wrote: On 2018-12-02 11:26, Jonas Maebe wrote: The LLVM version of the code generator has been significantly improved in the mean time: The LLVM code generator on the debug_eh branch now also works with Linux/ARM, although only with the hard float EABI for no

Re: [fpc-devel] LLVM code generator

2018-12-27 Thread Adriaan van Os
Jonas Maebe wrote: On 2018-12-02 11:26, Jonas Maebe wrote: The LLVM version of the code generator has been significantly improved in the mean time: Good work ! Regards, Adriaan van Os ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http

Re: [fpc-devel] LLVM code generator

2018-12-25 Thread Jonas Maebe
On 2018-12-02 11:26, Jonas Maebe wrote: The LLVM version of the code generator has been significantly improved in the mean time: * several testsuite failures and other bugs have been fixed * Lazarus (from the fixes_2_0 branch) can now be built (for Darwin/x86-64/Cocoa at least, have not tested

Re: [fpc-devel] LLVM code generator

2018-12-03 Thread Martin Frb
On 03/12/2018 07:57, Ryan Joseph wrote: What does this mean for end users? Do we get better debugging support in LLDB? Sorry for getting slightly off topic (replies to lazarus list pleas / or fpc other). Lazarus 2.0 has an LLDB based debugger, that uses it's own code (fpdebug) for watches. Fo

Re: [fpc-devel] LLVM code generator

2018-12-03 Thread Jonas Maebe
On 2018-12-03 07:57, Ryan Joseph wrote: On Dec 2, 2018, at 5:26 PM, Jonas Maebe wrote: The LLVM code generator is more or less ready, including Dwarf-EH-based exception handling support. It's currently only supported on Darwin/x86-64 and Linux/x86-64, but it can do a "make all" and the test

Re: [fpc-devel] LLVM code generator

2018-12-03 Thread Jonas Maebe
On 2018-12-02 17:25, Marģers . via fpc-devel wrote: >> ** Linux: you may also have to specify the library path to libgcc_s. >> E.g. on Ubuntu 16.04: >> make LOCALOPT="-dllvm -Fullvm -Fl/usr/lib/gcc/x86_64-linux-gnu/5" >> OPT="-Fullvm -Fl/usr/lib/gcc/x86_64-linux-gnu/5" all -j 4 FPMAKEOPT="-T >> 4"

[fpc-devel] LLVM code generator

2018-12-03 Thread Marģers . via fpc-devel
> The support is currently only on the > https://svn.freepascal.org/FPC/svn/fpc/branches/debug_eh branch. I got sources from https://svn.freepascal.org/svn/fpc/branches/debug_eh > ** Linux: you may also have to specify the library path to libgcc_s. > E.g. on Ubuntu 16.04: > make LOCALOPT="-dllvm

Re: [fpc-devel] LLVM code generator

2018-12-02 Thread Ryan Joseph
> On Dec 2, 2018, at 5:26 PM, Jonas Maebe wrote: > > > The LLVM code generator is more or less ready, including Dwarf-EH-based > exception handling support. It's currently only supported on Darwin/x86-64 > and Linux/x86-64, but it can do a "make all" and the testsuite can be > finished as w

[fpc-devel] LLVM code generator

2018-12-02 Thread Jonas Maebe
Hi, The LLVM code generator is more or less ready, including Dwarf-EH-based exception handling support. It's currently only supported on Darwin/x86-64 and Linux/x86-64, but it can do a "make all" and the testsuite can be finished as well. There are still some extra failures that do not happen

Re: [fpc-devel] LLVM

2016-12-15 Thread Michael Schnell
On 15.12.2016 08:35, Jonas Maebe wrote: Thanks a lot for the detailed explanation ! -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] LLVM

2016-12-15 Thread Karoly Balogh (Charlie/SGR)
Hi, On Wed, 14 Dec 2016, Michael Schnell wrote: > Of course another (better) option would be a fpc directly creating > WebAssembly, but I understand that this will take a lot of time. There is some interest in a WebAssembly backend, but yes it will take a lot of time. No spoilers for now, and no

Re: [fpc-devel] LLVM

2016-12-14 Thread Jonas Maebe
Michael Schnell wrote: > I remember that some time ago an LLVM version of fpc was under discussion. > > I'd like to know the state. If you don't perform control-flow-based LLVM optimizations, almost everything works on Darwin/x86-64 (and Linux/x86-64, except for safecall -- the reason for this ex

[fpc-devel] LLVM

2016-12-14 Thread Michael Schnell
I remember that some time ago an LLVM version of fpc was under discussion. I'd like to know the state. Background: I might be interested in doing a project that runs in the browser. It seems that the upcoming technology for this is WebAssembly. I found that an LLVM backend for WebAssembly some

Re: [fpc-devel] llvm merge

2015-04-08 Thread Jonas Maebe
Louis Salkind wrote on Wed, 08 Apr 2015: I am really happy to see this work moving forward. I think it is a great direction for the project. Direction is probably not the right word. It's no more a direction for the FPC project than adding support for AArch64, MSDOS or extended RTTI are

[fpc-devel] llvm merge

2015-04-07 Thread Louis Salkind
I am really happy to see this work moving forward. I think it is a great direction for the project. Unfortunately, though, revision 30351 (the first point at which the llvm branch was reintroduced) has broken my code on Windows 64. Things are working fine though on 32 bit Windows and Linux.

Re: [fpc-devel] LLVM

2013-01-07 Thread Graeme Geldenhuys
On 01/07/13 11:02, Michael Schnell wrote: >> > Lets see what Embarcadero comes up with I wouldn't hold my breath. Based on recent Embarcadero history, the first version would be absolute crap, second version might be beta quality, 3rd version might not even exist (removed from product). Reg

Re: [fpc-devel] LLVM

2013-01-07 Thread Michael Schnell
On 12/26/2012 11:43 AM, Martin Schreiber wrote: Do you have experiences with LLVM? Does it actually create great code? Lets see what Embarcadero comes up with -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepa

Re: [fpc-devel] LLVM

2013-01-07 Thread Michael Schnell
- Reply message - From: "Martin Schreiber" Date: Wed, Dec 26, 2012 06:07 Subject: [fpc-devel] LLVM To: Hi, Does any body work on a LLVM backend for Free Pascal? AFAIK, Embarcadero is doing something like this for a future version of Delphi (to provide an ARM compil

Re: [fpc-devel] LLVM

2012-12-27 Thread Florian Klämpfl
Am 26.12.2012 11:43, schrieb Martin Schreiber: > On Wednesday 26 December 2012 11:20:35 Florian Klämpfl wrote: >> Am 26.12.2012 06:07, schrieb Martin Schreiber: >>> Hi, >>> Does any body work on a LLVM backend for Free Pascal? >>> Thoughts? >> >> The counterpart of what you want: tries to generate

Re: [fpc-devel] LLVM

2012-12-26 Thread Marco van de Voort
In our previous episode, Martin Schreiber said: > > > Does any body work on a LLVM backend for Free Pascal? > > > Thoughts? > > > > The counterpart of what you want: tries to generate great code at any > > cost while being maintainable and having a portable code generator. > > > Do you have experie

Re: [fpc-devel] LLVM

2012-12-26 Thread Michael Van Canneyt
On Wed, 26 Dec 2012, Marcos Douglas wrote: Michael. All right... hehehe Well, I think everybody knows that is a huge task to implement... even for somebody of FPC core! None of the FPC team could have done it alone. It's only possible with the cooperation and help of the community. All h

Re: [fpc-devel] LLVM

2012-12-26 Thread Marcos Douglas
On Wed, Dec 26, 2012 at 10:20 AM, Michael Van Canneyt wrote: > > > On Wed, 26 Dec 2012, Marcos Douglas wrote: > >> On Wed, Dec 26, 2012 at 9:49 AM, Michael Van Canneyt >> wrote: >>> >>> >>> >>> >>> On Wed, 26 Dec 2012, Marcos Douglas wrote: >>> On Wed, Dec 26, 2012 at 2:07 AM, Martin Schreib

Re: [fpc-devel] LLVM

2012-12-26 Thread Michael Van Canneyt
On Wed, 26 Dec 2012, Marcos Douglas wrote: On Wed, Dec 26, 2012 at 9:49 AM, Michael Van Canneyt wrote: On Wed, 26 Dec 2012, Marcos Douglas wrote: On Wed, Dec 26, 2012 at 2:07 AM, Martin Schreiber wrote: Hi, Does any body work on a LLVM backend for Free Pascal? Has anybody experience

Re: [fpc-devel] LLVM

2012-12-26 Thread Marcos Douglas
On Wed, Dec 26, 2012 at 9:49 AM, Michael Van Canneyt wrote: > > > > On Wed, 26 Dec 2012, Marcos Douglas wrote: > >> On Wed, Dec 26, 2012 at 2:07 AM, Martin Schreiber wrote: >>> >>> Hi, >>> Does any body work on a LLVM backend for Free Pascal? >>> Has anybody experience with LLVM? >>> Are there li

Re: [fpc-devel] LLVM

2012-12-26 Thread Michael Van Canneyt
On Wed, 26 Dec 2012, Marcos Douglas wrote: On Wed, Dec 26, 2012 at 2:07 AM, Martin Schreiber wrote: Hi, Does any body work on a LLVM backend for Free Pascal? Has anybody experience with LLVM? Are there licensing issues? What about the quality of the produced code? What about compiling speed?

Re: [fpc-devel] LLVM

2012-12-26 Thread Marcos Douglas
On Wed, Dec 26, 2012 at 2:07 AM, Martin Schreiber wrote: > Hi, > Does any body work on a LLVM backend for Free Pascal? > Has anybody experience with LLVM? > Are there licensing issues? > What about the quality of the produced code? > What about compiling speed? > Thoughts? > > Thanks, Martin The

Re: [fpc-devel] LLVM

2012-12-26 Thread Sven Barth
On 26.12.2012 08:48, Jeppe Græsdal Johansen wrote: Having worked a bit with llvm I don't like the IDE of completely changing the backend of fpc. Mostly because we are then relying on a bunch of C++ programmers to fix bugs and extend the backend in the future. We would NOT give up the current ba

Re: [fpc-devel] LLVM

2012-12-26 Thread Sven Barth
On 26.12.2012 11:46, Michael Van Canneyt wrote: On Wed, 26 Dec 2012, Martin Schreiber wrote: On Wednesday 26 December 2012 11:20:35 Florian Klämpfl wrote: Am 26.12.2012 06:07, schrieb Martin Schreiber: Hi, Does any body work on a LLVM backend for Free Pascal? Thoughts? The counterpart of

Re: [fpc-devel] LLVM

2012-12-26 Thread Michael Van Canneyt
On Wed, 26 Dec 2012, Martin Schreiber wrote: On Wednesday 26 December 2012 11:20:35 Florian Klämpfl wrote: Am 26.12.2012 06:07, schrieb Martin Schreiber: Hi, Does any body work on a LLVM backend for Free Pascal? Thoughts? The counterpart of what you want: tries to generate great code at an

Re: [fpc-devel] LLVM

2012-12-26 Thread Martin Schreiber
On Wednesday 26 December 2012 11:20:35 Florian Klämpfl wrote: > Am 26.12.2012 06:07, schrieb Martin Schreiber: > > Hi, > > Does any body work on a LLVM backend for Free Pascal? > > Thoughts? > > The counterpart of what you want: tries to generate great code at any > cost while being maintainable an

Re: [fpc-devel] LLVM

2012-12-26 Thread Florian Klämpfl
Am 26.12.2012 06:07, schrieb Martin Schreiber: > Hi, > Does any body work on a LLVM backend for Free Pascal? > Thoughts? The counterpart of what you want: tries to generate great code at any cost while being maintainable and having a portable code generator. __

Re: [fpc-devel] LLVM

2012-12-25 Thread Jeppe Græsdal Johansen
m: "Martin Schreiber" Date: Wed, Dec 26, 2012 06:07 Subject: [fpc-devel] LLVM To: Hi, Does any body work on a LLVM backend for Free Pascal? Has anybody experience with LLVM? Are there licensing issues? What about the quality of the produced code? What about compiling speed? Thoug

[fpc-devel] LLVM

2012-12-25 Thread Martin Schreiber
Hi, Does any body work on a LLVM backend for Free Pascal? Has anybody experience with LLVM? Are there licensing issues? What about the quality of the produced code? What about compiling speed? Thoughts? Thanks, Martin ___ fpc-devel maillist - fpc-devel

[fpc-devel] LLVM code generation

2010-11-20 Thread Carl-Philip Haensch
Hello, I like the llvm architecture and want to ask if I can help developing the llvm code generation for fpc (with the intention to make llvm fully replace fpc's own asm generation) Here my questions: - Who is working on llvm integration? - What has to be done in the near future? - Wher

Re: [fpc-devel] LLVM Backend?

2009-11-17 Thread Marco van de Voort
In our previous episode, Matej Spiller-Muys said: [ Charset ISO-8859-1 unsupported, converting... ] > > You also get breaking backwards compatibility with a lot of existing > Delphi code for free. I repeat: you really cannot underestimate the amount > of > > implementation details that existing Del

Re: [fpc-devel] LLVM Backend?

2009-11-17 Thread Jonas Maebe
On 17 Nov 2009, at 09:30, Micha Nelissen wrote: > Jonas Maebe wrote: >> On 17 Nov 2009, at 08:18, Vincent Snijders wrote: >>> If you look at CPU secs, then the factor is 3 at most. What helps the C++ >>> programs most is that they use 4 cores more, the fpc programs are mostly >>> singlethreaded

Re: [fpc-devel] LLVM Backend?

2009-11-17 Thread Micha Nelissen
Jonas Maebe wrote: On 17 Nov 2009, at 08:18, Vincent Snijders wrote: If you look at CPU secs, then the factor is 3 at most. What helps the C++ programs most is that they use 4 cores more, the fpc programs are mostly singlethreaded. LLVM doesn't help to solve this (AFAIK). Anyway, the above i

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Jonas Maebe
On 17 Nov 2009, at 08:18, Vincent Snijders wrote: > Jonas Maebe schreef: >> And as mentioned before, it's with the stress on "game": the results on that >> site depend on almost as much on the implementation effort that people have >> put in optimizing the source code for "their" language as it

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Vincent Snijders
Jonas Maebe schreef: On 17 Nov 2009, at 07:31, Matej Spiller-Muys wrote: I have no idea. All I know that's slightly related is the alioth computer language benchmark game (with the stress on "game"), where you have at least both FPC and GCC results. Yup, the FPC factor is 2x-10x slower. That

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Jonas Maebe
On 17 Nov 2009, at 07:31, Matej Spiller-Muys wrote: >> I have no idea. All I know that's slightly related is the alioth computer >> language benchmark game (with the stress on "game"), where you have at least >> both FPC and GCC results. > Yup, the FPC factor is 2x-10x slower. That's because you

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Matej Spiller-Muys
> You also get breaking backwards compatibility with a lot of existing Delphi code for free. I repeat: you really cannot underestimate the amount of > implementation details that existing Delphi code depends on, and people already complain about FPC's incompatibility with those implementation detai

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Jonas Maebe
Matej Spiller-Muys wrote on Mon, 16 Nov 2009: C interfacing works today and has been very thoroughly tested. cppclass only works, for very basic things, since 2 days ago or so. Unless someone enjoys debugging a new code generator and a new external language interfacing paradigm at the same time,

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Matej Spiller-Muys
> C interfacing works today and has been very thoroughly tested. cppclass only works, for very basic things, since 2 days ago or so. Unless someone enjoys > debugging a new code generator and a new external language interfacing paradigm at the same time, that does not sound like a very good idea to

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Jonas Maebe
Matej Spiller-Muys wrote on Mon, 16 Nov 2009: I would love fpc to be based on LLVM backend. C bindings are ok, but wouldn't it be better to fix support for cppclass inside fpc (since it is already there) and create more proper C++ headers. C interfacing works today and has been very thoroughly

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Matej Spiller-Muys
I would love fpc to be based on LLVM backend. C bindings are ok, but wouldn't it be better to fix support for cppclass inside fpc (since it is already there) and create more proper C++ headers. I have studied clang project a bit (as C/C++ frontend for LLVM) and it actually makes more sense to me t

Re: [fpc-devel] LLVM Backend?

2009-11-16 Thread Samuel Crow
> > 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

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Jonas Maebe
On 12 Nov 2009, at 18:15, Samuel Crow wrote: - Original Message From: Jonas Maebe To: FPC developers' list 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 Bo

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Samuel Crow
Hi Jonas, - Original Message > From: Jonas Maebe > To: FPC developers' list > 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 > Bo

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Jonas Maebe
On 11 Nov 2009, at 23:41, Samuel Crow wrote: I can work on getting Borland Fastcalls implemented in the LLVM x86 backend. By the time I'm done with that we can talk about what else needs doing. Is there a test already in the FPC repository that I can use as a test to make sure that the c

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Michael Schnell
Florian Klaempfl wrote: > I'am sure, somebody > will write you a backend for the desired processor. Yep, a team of three: I, me, and myself. As this processor, a load/store RISC with 32 non-dedicated 32 Bit registers, is very similar to MIPS and thus a bit similar to ARM (only that MIPS-alike it

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Florian Klaempfl
Michael Schnell schrieb: > Florian Klaempfl wrote: >> Just use GPC then? > > It does not compile the many thousands of lines of the Delphi project I > want to port :(. Yes, because it's probably very hard to make a (Object) Pascal front end for gcc. Another backend for FPC is 4k-5k lines (pascal,

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Michael Schnell
Florian Klaempfl wrote: > Just use GPC then? It does not compile the many thousands of lines of the Delphi project I want to port :(. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-dev

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Florian Klaempfl
Michael Schnell schrieb: > P.S.: > > In this list, we already did discuss doing an FPC version that creates > the intermediate code that can be fed to the GCC code generator. This > would make available to FPC all relevant CPU architectures and > supposedly the low level optimization that gcc4 doe

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Michael Schnell
P.S.: In this list, we already did discuss doing an FPC version that creates the intermediate code that can be fed to the GCC code generator. This would make available to FPC all relevant CPU architectures and supposedly the low level optimization that gcc4 does on this intermediate code is hard t

Re: [fpc-devel] LLVM Backend?

2009-11-12 Thread Michael Schnell
Samuel Crow wrote: GCC already does provide C and C++ (this is a Linux system after all :) ) and I suppose it thus also does provide Objective C and Objective Pascal. I would need FPC ("Delphi Language" Pascal), as I'd like to port a lot of Delphi code. I _HOPED_ LLVM would use the GCC code gene

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Samuel Crow
- Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Wed, November 11, 2009 3:41:22 PM > Subject: Re: [fpc-devel] LLVM Backend? > > > Yes, it does, thanks. The main problem I see is that my approach would > require a > lot of ini

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Jonas Maebe
On 11 Nov 2009, at 21:35, Samuel Crow wrote: It's not entirely clear to me yet how you see the result: an FPC frontend added to the LLVM project, or an LLVM backend added to the FPC project. I favour the latter, but a lot of what you talk about seems to be about the former. Or am I misund

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Samuel Crow
- Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Wed, November 11, 2009 1:43:08 PM > Subject: Re: [fpc-devel] LLVM Backend? > -snip- > > > That's two problems, both fairly significant (although the latter is > definit

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Jonas Maebe
On 11 Nov 2009, at 16:55, Samuel Crow wrote: - Original Message From: Jonas Maebe To: FPC developers' list Sent: Wed, November 11, 2009 5:03:52 AM Subject: Re: [fpc-devel] LLVM Backend? In a sense it's no problem if the LLVM backend doesn't support all targets

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Samuel Crow
- Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Wed, November 11, 2009 5:03:52 AM > Subject: Re: [fpc-devel] LLVM Backend? > > > On 11 Nov 2009, at 04:29, Samuel Crow wrote: > > > As noted in other messages on the l

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Samuel Crow
Message > From: Michael Schnell > To: FPC developers' list > Sent: Wed, November 11, 2009 4:56:52 AM > Subject: Re: [fpc-devel] LLVM Backend? > > Samuel Crow wrote: > > > I'm looking forward to the challenges of this project. > > I am planing for

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Jonas Maebe
On 11 Nov 2009, at 12:24, Michael Schnell wrote: Jonas Maebe wrote: b. the dragonegg approach (http://dragonegg.llvm.org/), where you make use of the support in an existing compiler (again GCC in this case) for abstract code generator support to emit LLVM assembler/bitcode rather than mach

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Michael Schnell
Jonas Maebe wrote: > b. the dragonegg approach (http://dragonegg.llvm.org/), where you make > use of the support in an existing compiler (again GCC in this case) for > abstract code generator support to emit LLVM assembler/bitcode rather > than machine code For my upcoming project: I (of course) d

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Jonas Maebe
On 11 Nov 2009, at 04:29, Samuel Crow wrote: The IRBuilder class http://llvm.org/doxygen/classllvm_1_1IRBuilder.html is as stable as the instruction set it builds and is maintained as such since it is used by Clang, LLVM-GCC and other frontends. Ok, that would be fine then. The only proble

Re: [fpc-devel] LLVM Backend?

2009-11-11 Thread Michael Schnell
Samuel Crow wrote: > I'm looking forward to the challenges of this project. I am planing for another project: doing an FPC compiler for the NIOS processor (which is similar to MIPS32) on a Linux target. Do you think it's viable to consider LLVM instead of trying to modify the "native" ARM FPC co

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Samuel Crow
- Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Tue, November 10, 2009 3:46:59 PM > Subject: Re: [fpc-devel] LLVM Backend? > > > On 10 Nov 2009, at 21:35, Samuel Crow wrote: > -snip- > > Do the object-oriented featu

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Samuel Crow
Hello again Jonas, - Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Tue, November 10, 2009 3:46:59 PM > Subject: Re: [fpc-devel] LLVM Backend? -snip- > I don't see any problem at all with announcing that people are working on a

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Jonas Maebe
On 10 Nov 2009, at 23:00, Marco van de Voort wrote: In our previous episode, Jonas Maebe said: With an LLVM backend, there will obviously be a dependency on LLVM (either as a library or as an installed tool chain) and hence on its dependencies, but it would be nice if we could be compatible w

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > With an LLVM backend, there will obviously be a dependency on LLVM > (either as a library or as an installed tool chain) and hence on its > dependencies, but it would be nice if we could be compatible with as > many different LLVM releases as pos

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Jonas Maebe
On 10 Nov 2009, at 21:35, Samuel Crow wrote: The current way to implement pointer arithmetic in LLVM is to use an i64 for all instances of pointers We can't do that at the high level, since then all pointer fields in records etc would become 64 bit. And the low level currently assumes th

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Samuel Crow
Hello Jonas, (Replies inline.) - Original Message > From: Jonas Maebe > To: FPC developers' list > Sent: Tue, November 10, 2009 1:57:03 PM > Subject: Re: [fpc-devel] LLVM Backend? > -snip- > The main things that basically halted my work on the LLVM backend

Re: [fpc-devel] LLVM Backend?

2009-11-10 Thread Jonas Maebe
On 10 Nov 2009, at 19:28, Samuel Crow wrote: I'd like to help with the experimental LLVM backend if anyone is interested. It's been years since I've used Pascal though, so perhaps my familiarity with C and C++ on the LLVM end will be beneficial. Thanks for the offer! While we're on the

[fpc-devel] LLVM Backend?

2009-11-10 Thread Samuel Crow
Hello, I'd like to help with the experimental LLVM backend if anyone is interested. It's been years since I've used Pascal though, so perhaps my familiarity with C and C++ on the LLVM end will be beneficial. While we're on the subject, LLVM has a very powerful optimizer that, when used in con