removing -frename-registers from sys/conf.mk
Bruce Evans
brde at optusnet.com.au
Fri Jan 21 06:15:19 UTC 2011
On Thu, 20 Jan 2011, Matthew Jacob wrote:
> Never mind this ill thought out request.
>
> On 1/20/2011 3:53 PM, Matthew Jacob wrote:
>> It helps substantially in trying to debug amd64 kernels to remove this
>> flag.
>>
>> Has anyone heard of a good reason we need to keep this? Whom else should I
>> ask?
What's ill-thought out about it?
It may be bad for debugging, but can hardly be as bad as -O2 and a couple
other optimizations now under -O, at least with ddb. gdb with full
debugging info can sometimes follow when the code was reordered, but it
has to show all the reordering when stepping.
I didn't know about -frename-registers and just tried it on libm. It
gives only pessimizations of up to 60% on (uncommitted) log functions
in the float precision case. This turned out to be just a pessimization
that I've seen before and had worked around, but the workaround stopped
working with -frename-registers. gcc and clang in FreeBSD don't really
understand SSE, so they like to try to generate partial register stalls,
which cost 20-30 cycles on at least AthlonXP, Athlon64 and core2.
Fortunately, the stall doesn't occur in most cases where it might happen.
Bruce
More information about the freebsd-arch
mailing list