Sign in Join

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

Mailing lists / fpc-pascal / 2008-10

Default compiler options for shootout using fpc 2.2.0

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Vincent Snijders

What should be the default compiler options for the shootout benchmarks?

The used compiler is fpc 2.2.0. The benchmarks are run on a Intel Q6600 quad-core, either with 32 bits or 64 bits Ubuntu.

There is some controversion about it, see
https://alioth.debian.org/tracker/index.php?func=detail&aid=311109&group_id=30402&atid=411002

There are two proposals:
-O3oregvar -XX -Xs
and
-XXs -Oppentiumm -Cppentiumm -O3

Does -O3 enable regvar optimization on i386 and x86_64?

If not, why not? Does it produce wrong code in certain circumstances?

Vincent

Florian Klaempfl
to Vincent Snijders
Show quoted text 13 lines
What should be the default compiler options for the shootout benchmarks? The used compiler is fpc 2.2.0. The benchmarks are run on a Intel Q6600 quad-core, either with 32 bits or 64 bits Ubuntu. There is some controversion about it, see https://alioth.debian.org/tracker/index.php?func=detail&aid=311109&group_id=30402&atid=411002 There are two proposals: -O3oregvar -XX -Xs and -XXs -Oppentiumm -Cppentiumm -O3

On 32 bit systems
-XXs -Oppentiumm -Cppentiumm -O3

On 64 bit systems
-XXs -O3

Vincent Snijders
to Florian Klaempfl
Florian Klaempfl wrote 20 lines
Vincent Snijders schrieb: > What should be the default compiler options for the shootout benchmarks? > > The used compiler is fpc 2.2.0. The benchmarks are run on a Intel > Q6600 quad-core, either with 32 bits or 64 bits Ubuntu. > > There is some controversion about it, see > https://alioth.debian.org/tracker/index.php?func=detail&aid=311109&group_id=30402&atid=411002 > > > There are two proposals: > -O3oregvar -XX -Xs > and > -XXs -Oppentiumm -Cppentiumm -O3 On 32 bit systems -XXs -Oppentiumm -Cppentiumm -O3 On 64 bit systems -XXs -O3

If I look at
http://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/release_2_2_0/compiler/x86_64/cpuinfo.pas?view=markup it seems that in fpc 2.2.0 regvars are not enabled. Why not?

Why does it work for Peter Blackman in the mandelbrot benchmark?

Vincent

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote
If I look at http://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/release_2_2_0/compiler/x86_64/cpuinfo.pas?view=markup it seems that in fpc 2.2.0 regvars are not enabled. Why not?

Because they didn't work properly with was fixed
later, but enabling them by default is not a fix so it was not merged to the fixes branch (and since you can explicitly enable them using - Ooregvar, it's even less required to merge this change back).

Jonas

Vincent Snijders
to Jonas Maebe
Jonas Maebe wrote 11 lines
On 05 Oct 2008, at 11:09, Vincent Snijders wrote: > If I look at > http://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/release_2_2_0/compiler/x86_64/cpuinfo.pas?view=markup it > seems that in fpc 2.2.0 regvars are not enabled. Why not? Because they didn't work properly with was fixed later, but enabling them by default is not a fix so it was not merged to the fixes branch (and since you can explicitly enable them using -Ooregvar, it's even less required to merge this change back).

In fpc 2.2.0, a first release on the fixes_2_2 branch, do regvars properly or not? Your answer seems to indicate they do, but that they were not enabled by default (yet).

Vincent

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote 12 lines
Jonas Maebe schreef: > On 05 Oct 2008, at 11:09, Vincent Snijders wrote: >> If I look at http://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/release_2_2_0/compiler/x86_64/cpuinfo.pas?view=markup >> it seems that in fpc 2.2.0 regvars are not enabled. Why not? > Because they didn't work properly with was > fixed later, but enabling them by default is not a fix so it was > not merged to the fixes branch (and since you can explicitly enable > them using -Ooregvar, it's even less required to merge this change > back). In fpc 2.2.0, a first release on the fixes_2_2 branch, do regvars properly or not?

I know they work fine in 2.3.1: http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=1&run1id=30179&run2id=30188&noskipped=1&failedonly=1

The only difference is that apparently profiling doesn't work with regvars on.

I'm not aware of any related fixes which have not been merged to the fixes branch, but I don't know whether all of those fixes were merged back before 2.2.0. I guess they should work fine there, though.

Your answer seems to indicate they do, but that they were not enabled by default (yet).

They're not enabled by default in 2.2.2 either, for that matter.

Jonas

Vincent Snijders
to Florian Klaempfl: On 32 bit systems -XXs -Oppentiumm -Cppentiumm -O3 On 64 bit systems -XXs -O3
Florian Klaempfl wrote 20 lines
Vincent Snijders schrieb: > What should be the default compiler options for the shootout benchmarks? > > The used compiler is fpc 2.2.0. The benchmarks are run on a Intel > Q6600 quad-core, either with 32 bits or 64 bits Ubuntu. > > There is some controversion about it, see > https://alioth.debian.org/tracker/index.php?func=detail&aid=311109&group_id=30402&atid=411002 > > > There are two proposals: > -O3oregvar -XX -Xs > and > -XXs -Oppentiumm -Cppentiumm -O3 On 32 bit systems -XXs -Oppentiumm -Cppentiumm -O3 On 64 bit systems -XXs -O3

Looking at the remarks of Jonas, isn't the following better for 64 bits systems?

-XXs -O3 -Oregvar

Vincent