amd64: -O2 even with DEBUG
Warner Losh
imp at bsdimp.com
Sat Jul 27 00:45:02 UTC 2013
On Jul 26, 2013, at 11:54 AM, John-Mark Gurney wrote:
> Andriy Gapon wrote this message on Fri, Jul 26, 2013 at 10:14 +0300:
>> I wonder why amd64 is distinguished to have -O2 in COPTFLAGS even when DEBUG is
>> defined. For all other archs it's -O for that case.
>>
>> Perhaps, this was discussed / explained in the past, but I would appreciate it
>> being said again (or even written as a comment in kern.pre.mk).
>
> It's probably because at least gcc produces terrible amd64 code w/o
> it... It will constantly reload the register it uses to do relative
> loads w/ the same value even though nothing changed... makes performance
> suck...
Still looks like it is implemented wrongly though...
Warner
More information about the freebsd-arch
mailing list