Re: some questions about GCC's options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/1/12, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> ohav chochmah <philomath868@xxxxxxxxx> writes:
>
>> first, is momit-leaf-frame-pointer bad for debugging (in the way
>> fomit-frame-pointer can be)?
>
> It's not as bad.  It may still trip up some debuggers.
>
but not GDB?

>> if not, why is it disabled by default
>> even when optimizing (as -Q --help=target | grep omit reveals)?
>
> When optimizing on x86 or x86_64, -fomit-frame-pointer is the default
> anyhow.  -fomit-frame-pointer essentially implies
> -momit-leaf-frame-pointer.
>

I was sure that's the answer, but then is GCC lying to me?
~ $ gcc -S tst.c -O2 -march=native -Q --help=optimizers | grep omit
  -fomit-frame-pointer        		[disabled]

>> next, the manual mentions that fno-fat-lto-objects improves
>> compilation time over plain LTO, but requires the whole toolchain to
>> be aware of LTO and support plugins, which is why it's not (yet) the
>> default.  how can I know for certain if the toolchain I'm using meets
>> the criteria (seems to be the case)?
>
> Use the most recent GNU binutils release.
>
good then, thanks.

>> similarly, mtls-dialect=gnu2 is better then the default gnu, "but it
>> may add compile- and run-time requirements that cannot be satisfied on
>> all systems."  how can I test for them?
>
> Build a program with it and see.  Basically your GNU binutils need to be
> fairly new and your glibc needs to be 2.9 or later.
>
good, thanks.
>> is it true that mfpmath=sse can result in poor code when using glibc?
>> (maybe I shouldn't ask that here...)
>
> For x86_64 -mfpmath=sse is the default.
>
here again:
~ $ gcc -S tst.c -O2 -march=native -Q --help=target | grep 'mfpmath='
  -mfpmath=                   		387

>> why is msse disabled by default even after march=native, while
>> msse[234], msse4.[12] and mssse3 are all enabled?
>
> Not sure--what makes you think this is the case?
>
sorry, 's/msse/mmmx/'.
~ $ gcc -S tst.c -O2 -march=native -Q --help=target | grep mmx
  -mmmx                       		[disabled]

~ $ sudo x86info -a -v | grep -i mmx
 mmx     	MMX support

>> isn't the CRC32 instruction part of sse4.2?, why is mcrc32 disabled by
>> default even when sse4.2 is enabled?
>
> It's not.  Don't be confused by the fact that -msse4.2 does not
> automatically turn on -mcrc32.  Everything that is available when using
> -mcrc32 is also available when using -msse4.2.
>
thanks.
> Ian
>
cheers.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux