Subject: Safety of -frename-registers on amd64 (-current)
To: None <tech-toolchain@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: tech-toolchain
Date: 06/22/2007 09:55:37
I've been playing around with -frename-registers on amd64 in -current,
and it seems that in quite a few scenarios it's a discernable win (I'm
using a march=nocona CPU).  I haven't formally tested gcc, but I'd be
surprised if I were wrong about it being faster with
-frename-registers.  The kernel also seems faster, but I have to do
some profiling.
At any rate, the improvement seems significant enough to warrant my
looking into it further.

FreeBSD (and maybe linux/some linux distributions) build their amd64
kernels with -frename-registers.
I haven't experienced any crashes/lockups/etc I could directly
attribute to it, but this begs the question:  Is there any way to
discern whether or not a given problem was [likely to have been]
caused by this?

Perl seems faster as well, but in the test suite it fails one test
(for the "Benchmark" module), while normally it passes all of the
tests.  The result is garbage, as far as I can tell (huge random
signed integer).  I'm interested in whether this is a compiler bug or
code in perl that makes assumptions based upon the usual behavior of
gcc that don't hold when register renaming is enabled.
Certainly, I have no idea how to tell. ;)

I realize that the answers to the questions could be quite lengthy,
but all I need are a few pointers--I'll try to use google for my
inquiries after that.

Thanks for the help,

--Blair