question about knowing when optimization options are used

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

 



Hello,

The gcc man page says:

Most optimizations are only enabled if an -O level is set on the command line.  Otherwise they are disabled, even if individual optimization flags are specified.

The man page says to use `-Q --help=optimizers` to find out what is turned on for the different -O levels as configure-time options can make things different from the defaults shown later in that man page. However, I have found that, even when using -O0, I can turn on optimization options, at least according to the help output:

$> gcc -Q --help=optimizers | grep "\-fmove-loop-invariants"
  -fmove-loop-invariants                [disabled]
$> gcc -Q --help=optimizers -fmove-loop-invariants | grep "\-fmove-loop-invariants"
  -fmove-loop-invariants                [enabled]

I get the same result when using "-O0". Given the line from the gcc man page, I would have expected this option to still be disabled even when using it explicitly on the command line. Have I misunderstood the man page line? Or I am misunderstanding the help output? Or is something else altogether going on?

Thank for any and all help,
David




[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