Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Florian Klämpfl
Am 28.10.2018 um 02:24 schrieb Ben Grasset: > On Sat, Oct 27, 2018 at 8:22 PM Ozz Nixon > wrote: > > * Sorry for off topic - just that grabbed my "What did he just say?" > button.. > > > Huh? I said "Also linked lists absolutely everywhere, that would perform muc

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Florian Klämpfl
Am 28.10.2018 um 02:11 schrieb Ben Grasset: > > There's also a number of things that would specifically help the build-time > performance of the compiler itself that I've > noticed, such as there being many, many, many, one-liner functions and > procedures that should almost certainly be marked

Re: [fpc-devel] The 15k bounty: Optimizing executable speed forLinux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Michael, > I think that specific improvements should be specified, and a bounty for > each of these improvements should be specified, instead of an overall > bounty. I agree. Let's agree on a list of improvements, and spread to bounty accordingly. Simon __

Re: [fpc-devel] The 15k bounty: Optimizing executable speed forLinux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Gareth, > And unfortunately not many of us have > access to Kylix. I can have a look if a can package something that works based on the old Open Edition of Kylix for those who don't have an Kylix ISO floating around. Simon ___ fpc-devel maillist -

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Florian, > The %gs based approach works only for object files linked statically to > the executable. In general there are four TLS access models on linux and > at least three of them need to be supported, if one wants to support > dyn. libraries in a usefull manner. Are you talking about bein

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Ben, > There's one more problem I forgot to mention in my first post, and it is > probably a deal breaker for the original bounty: LLVM does not support > Borland's fastcall calling convention for i386. So you would need to add > support for Borland fastcall on i386 to LLVM if it has to sup

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Sven, > And no one said that it is. But points like table based exception > handling and section based threadvars can be relatively easily > achieved and benefits more targets while working on the optimizer > usually is a per platform work. I agree that this very likely will make a big boost.

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Sven Barth via fpc-devel
Simon Kissel schrieb am So., 28. Okt. 2018, 12:30: > Hi Florian, > > > The %gs based approach works only for object files linked statically to > > the executable. In general there are four TLS access models on linux and > > at least three of them need to be supported, if one wants to support > >

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Florian, > But there is another pretty simple optimization opportunity in this > area: make the FPC heap manager capable of using > os-based memory reallocation. Kernel-based memory reallocation of > large blocks has the big advantage that the OS can > move the memory contents only by re-mappin

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Sven, > The thing is that we can't enable or disable a feature based on > whether a program links third party libraries or a unit is included > in a library or not, cause we might need to work with precompiled > units. So either you'll need to enable this feature for a locally > build FPC amd b

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Sven Barth via fpc-devel
Simon Kissel schrieb am So., 28. Okt. 2018, 12:39: > Hi Ben, > > > There's one more problem I forgot to mention in my first post, and it is > > probably a deal breaker for the original bounty: LLVM does not support > > Borland's fastcall calling convention for i386. So you would need to add >

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Sven Barth via fpc-devel
Simon Kissel schrieb am So., 28. Okt. 2018, 12:46: > Hi Florian, > > > But there is another pretty simple optimization opportunity in this > > area: make the FPC heap manager capable of using > > os-based memory reallocation. Kernel-based memory reallocation of > > large blocks has the big advant

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Jonas, >> - Complete the LLVM branch of FPC. It looks like Jonas has stopped >>working on it two years ago, which is a pity. > I didn't stop working on it, but I didn't make real progress anymore > either. So, would you be interested in making progress again? :) > a) exception handling

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Sven, > Borland's Fastcall is more famously known as the Register calling > convention aka the default calling convention in Object Pascal. As > you admitted in your mail further down you have quite some assembly > code and as such you rely on the calling convention for parameter > passing. Her

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi Florian, [DWARF-EH] > This is something I would like to work for years on already. So > maybe its now a good opportunity to start with it. *hugs* Simon ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/m

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Sven Barth via fpc-devel
Am 28.10.2018 um 13:00 schrieb Simon Kissel: Additionally, in the current FPC code generator global variables behave mostly as volatile variables. With LLVM, that won't be the case (unless we mark all of their accesses as volatile, but that would obviously inhibit LLVM optimizations). This may

[fpc-devel] Kylix Open Edition - was: The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Simon Kissel
Hi, I've packed together a minimal CrossKylix build that includes the old Kylix 3 Open Edition, for those who wish to have a look and/or test (to be provided) the bounty test project later on without violating any Borland (RIP) licenses. Please note that this has only been tested using my CrossKy

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Jonas Maebe
On 25/10/18 21:33, Sven Barth via fpc-devel wrote: As you already started working on translating that part of libgcc, would you please provide what you have so far? :) I've committed it in the dwarf_eh branch. Unfortunately, the an x86-64 compiler compiled with optimizations enabled crashes wh

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Jonas Maebe
On 28/10/18 19:14, Jonas Maebe wrote: I've committed it in the dwarf_eh branch. Unfortunately, the an x86-64 compiler compiled with optimizations enabled crashes while compiling this code (probably due to https://bugs.freepascal.org/view.php?id=34385 :) ) Actually, it was to a bug in my code!

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-28 Thread Jonas Maebe
On 28/10/18 13:00, Simon Kissel wrote: Hi Jonas, [exceptions for invalid memory accesses] have been working a bit on it since then). This is not something that can be changed/fixed in FPC, and is quite different from how FPC's current code generator works (I don't know how Embarcardero deals wit

Re: [fpc-devel] The 15k bounty: Optimizing executable speed forLinux x86 / LLVM

2018-10-28 Thread Ben Grasset
On Sun, Oct 28, 2018 at 12:40 AM J. Gareth Moreton < gar...@moreton-family.com> wrote: > Part of my incentive is that I like to design games and am also an amateur > mathematician, both fields that can benefit from speed gains, so if I can > make Free Pascal into something that is suitable for suc