Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-12

LLVM

18 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Reply by email

Jeppe Græsdal Johansen

The IR changes syntax often, so using that will most likely cause version problems. The other option is to use C++ classes directly which apparently is more stable.

I know i386, x86_64 and ARM works pretty good. I don't know about the few others.

Compiling speed is very, very slow :) (when using ir input at least)

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.

Regards
Jeppe Johansen

----- Reply message -----

Earlier message 14 lines
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? Has anybody experience with LLVM? Are there licensing issues? What about the quality of the produced code? What about compiling speed? Thoughts? Thanks, Martin

Reply by email

Martin Schreiber
to Florian Klämpfl
Florian Klämpfl wrote 8 lines
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.

Do you have experiences with LLVM? Does it actually create great code?

Martin

Reply by email

Michael Van Canneyt
to Martin Schreiber
Martin Schreiber wrote 10 lines
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 and having a portable code generator. > Do you have experiences with LLVM? Does it actually create great code?
As far as I know, Jonas has some experience with it;
I'm not sure whether he actually looked at a back-end for it.

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
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 any >> cost while being maintainable and having a portable code generator. >> > Do you have experiences with LLVM? Does it actually create great code? As far as I know, Jonas has some experience with it; I'm not sure whether he actually looked at a back-end for it.

He did look, because there's a LLVM branch after all :)

Regards,
Sven

Reply by email

Sven Barth
to Jeppe Græsdal Johansen: The IR changes syntax often, so using that will most likely cause version problems. The…
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 backends. LLVM would simply be an additional backend.

Regards,
Sven

Reply by email

Marcos Douglas
to Martin Schreiber: Does any body work on a LLVM backend for Free Pascal? Has anybody experience with LLVM?…
Martin Schreiber wrote 9 lines
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 author of ExtPascal created this project: llvm-pascal http://code.google.com/p/llvm-pascal/

Marcos Douglas

Reply by email

Michael Van Canneyt
to Marcos Douglas
Marcos Douglas wrote 13 lines
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 author of ExtPascal created this project: llvm-pascal http://code.google.com/p/llvm-pascal/

Please...

Have you actually looked at the code ? It doesn't even read/write units.

Besides actual code, it is doomed to fail in principle:

"The purpose of LLVM-Pascal is to have a similar functionality with up to 4000 lines of code"

A stand-alone, cross-platform, object pascal compiler that produces a working binary in less than 4000 lines of code ? Get real :)

Some things are by definition not simple.

Michael.

Reply by email

Marcos Douglas
to Michael Van Canneyt
Michael Van Canneyt wrote 35 lines
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? >> Thoughts? >> >> Thanks, Martin > > > The author of ExtPascal created this project: llvm-pascal > http://code.google.com/p/llvm-pascal/ Please... Have you actually looked at the code ? It doesn't even read/write units. Besides actual code, it is doomed to fail in principle: "The purpose of LLVM-Pascal is to have a similar functionality with up to 4000 lines of code" A stand-alone, cross-platform, object pascal compiler that produces a working binary in less than 4000 lines of code ? Get real :) Some things are by definition not simple. Michael.

Michael,
I don't know anything about LLVM or LLVM-Pascal and no, I did not read any unit...
If even Martin Schreiber has doubts and asked "thoughts" well I just put thoughts on the table. ;-)

Marcos Douglas

Reply by email

Michael Van Canneyt
to Marcos Douglas
Marcos Douglas wrote 43 lines
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 licensing issues? >>> What about the quality of the produced code? >>> What about compiling speed? >>> Thoughts? >>> >>> Thanks, Martin >> >> >> The author of ExtPascal created this project: llvm-pascal >> http://code.google.com/p/llvm-pascal/ > > > Please... > > Have you actually looked at the code ? It doesn't even read/write units. > > Besides actual code, it is doomed to fail in principle: > > "The purpose of LLVM-Pascal is to have a similar functionality with up to 4000 lines of code" > > A stand-alone, cross-platform, object pascal compiler that produces a working binary in less than 4000 lines of code ? Get real :) > > Some things are by definition not simple. > > Michael. Michael, I don't know anything about LLVM or LLVM-Pascal and no, I did not read any unit... If even Martin Schreiber has doubts and asked "thoughts" well I just put thoughts on the table. ;-)

No problem.

But presenting it just like that makes people think that it is actually easy or already accomplished to create something like FPC or Delphi.

When in fact it is not, far from it.

So I provide some perspective (OK, not without sarcasm...).

Michael.

Reply by email

Marcos Douglas
to Michael Van Canneyt
Michael Van Canneyt wrote 68 lines
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 with LLVM? >>>> Are there licensing issues? >>>> What about the quality of the produced code? >>>> What about compiling speed? >>>> Thoughts? >>>> >>>> Thanks, Martin >>> >>> >>> >>> The author of ExtPascal created this project: llvm-pascal >>> http://code.google.com/p/llvm-pascal/ >> >> >> >> Please... >> >> Have you actually looked at the code ? It doesn't even read/write units. >> >> Besides actual code, it is doomed to fail in principle: >> >> "The purpose of LLVM-Pascal is to have a similar functionality with up to >> 4000 lines of code" >> >> A stand-alone, cross-platform, object pascal compiler that produces a >> working binary in less than 4000 lines of code ? Get real :) >> >> Some things are by definition not simple. >> >> Michael. > > > Michael, > I don't know anything about LLVM or LLVM-Pascal and no, I did not read > any unit... > If even Martin Schreiber has doubts and asked "thoughts" well I just > put thoughts on the table. ;-) No problem. But presenting it just like that makes people think that it is actually easy or already accomplished to create something like FPC or Delphi. When in fact it is not, far from it. So I provide some perspective (OK, not without sarcasm...). Michael.

All right... hehehe
Well, I think everybody knows that is a huge task to implement... even for somebody of FPC core!

Regards,
Marcos Douglas

Reply by email

Michael Van Canneyt
to Marcos Douglas
Marcos Douglas wrote 5 lines
> 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 help is welcome. That is why I still try to get Martin to help instead of fork. More people can get more work done.

Michael.

Reply by email

Marco van de Voort
to Martin Schreiber: Do you have experiences with LLVM? Does it actually create great code? Martin

In our previous episode, Martin Schreiber said:

Show quoted text 7 lines
> > 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 experiences with LLVM? Does it actually create great code?

Phonorix had some benchmarks, and generally in gcc came out on top.

Reply by email

Florian Klämpfl
to Martin Schreiber: Do you have experiences with LLVM? Does it actually create great code? Martin
Martin Schreiber wrote 10 lines
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 and having a portable code generator. > Do you have experiences with LLVM?

I know at least the generated arm code of it.

Does it actually create great code?

I mentioned only the goal of the project.

Reply by email

Michael Schnell
to Jeppe Græsdal Johansen: The IR changes syntax often, so using that will most likely cause version problems. The…
Show quoted text 9 lines
----- 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 compiler that is rather compatible to FP).

-Michael

Reply by email

Graeme Geldenhuys
to Michael Schnell
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).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email