[fpc-devel] Source Code Optimization

Samuel Crow samuraileumas at yahoo.com
Mon Nov 16 19:15:24 CET 2009

 ---- Original Message ----
> From: Micha Nelissen <micha at neli.hopto.org>
> To: FPC developers' list <fpc-devel at lists.freepascal.org>
> Sent: Mon, November 16, 2009 12:03:27 PM
> Subject: Re: [fpc-devel] Source Code Optimization
> Dariusz Mazur wrote:
> > Maybe it is something interesting
> > 
> > 
> http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf 
> Seems that LLVM doesn't do so well, but not as bad as Microsoft :P. GCC seems to 
> be quite good.

That same link was sent to the LLVM Developers' mailing list.  You'd better believe they're working on it.  Some of those tricks are actually rather "low hanging fruit" for the LLVM optimizer.  Also, the SUN compiler did even worse than Microsoft so don't be too negative about LLVM.

LLVM is mediocre for the tests given but it's also the newest and most maintainable codebase of any of them.  It was written for readability, maintainability, and overall hackability.  That was the point of the whole slideshow linked above.

When the Mattathias BASIC project was started, our team looked at GCC because it already had a backend for the 68k and PowerPC Amiga computers.  It seemed to be the natural choice but when it came to finding documentation for writing a GCC frontend, the task suddenly jumped to a higher energy requirement.  We chose LLVM even though it means having to write our own 68k backend because LLVM is MUCH better documented code.


More information about the fpc-devel mailing list