Re: GCC optimizations with O3

2020-04-22 Thread NightStrike via Gcc
On Wed, Apr 22, 2020 at 10:25 AM Jakub Jelinek via Gcc wrote: > An -O? option is not just a set of suboptions it enables Maybe it should be. I notice this come up often enough at least.

Re: GCC optimizations with O3

2020-04-22 Thread Michael Matz
Hello, On Wed, 22 Apr 2020, Erick Ochoa wrote: > in order for me to debug my issue, I'm going to have to refactor passes > which directly reference optimize. For debugging you can also work backwards: use -O3 and add -fno-xy options. At least you then know (after disabling all O3 passes) that

Re: GCC optimizations with O3

2020-04-22 Thread Erick Ochoa
On 22/04/2020 16:25, Jakub Jelinek wrote: On Wed, Apr 22, 2020 at 04:17:56PM +0200, Philipp Tomsich wrote: ptomsich@android:~/riscv/gcc/gcc$ git grep OPT_LEVELS_3 common/common-target.h: OPT_LEVELS_3_PLUS, /* -O3 and above. */ common/common-target.h: OPT_LEVELS_3_PLUS_AND_SIZE, /* -O3 and

Re: GCC optimizations with O3

2020-04-22 Thread Jakub Jelinek via Gcc
On Wed, Apr 22, 2020 at 04:17:56PM +0200, Philipp Tomsich wrote: > ptomsich@android:~/riscv/gcc/gcc$ git grep OPT_LEVELS_3 > common/common-target.h: OPT_LEVELS_3_PLUS, /* -O3 and above. */ > common/common-target.h: OPT_LEVELS_3_PLUS_AND_SIZE, /* -O3 and above and > -Os. */ > common/config/arc/

Re: GCC optimizations with O3

2020-04-22 Thread Martin Liška
On 4/22/20 4:01 PM, Erick Ochoa wrote: Hello, Does anyone know if the following text from the GCC internals [0] is outdated? -O3     Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the following optimization flags:     -fgcse-after-reload     -fipa-cp-

Re: GCC optimizations with O3

2020-04-22 Thread Erick Ochoa
Thanks! I was looking for "optimize" (since that's the flag defined in common.opt). But you can probably guess how many lines will match "optimize". On 22/04/2020 16:17, Philipp Tomsich wrote: ptomsich@android:~/riscv/gcc/gcc$ git grep OPT_LEVELS_3 common/common-target.h: OPT_LEVELS_3_PLUS, /

Re: GCC optimizations with O3

2020-04-22 Thread Philipp Tomsich
ptomsich@android:~/riscv/gcc/gcc$ git grep OPT_LEVELS_3 common/common-target.h: OPT_LEVELS_3_PLUS, /* -O3 and above. */ common/common-target.h: OPT_LEVELS_3_PLUS_AND_SIZE, /* -O3 and above and -Os. */ common/config/arc/arc-common.c:#define OPT_LEVELS_3_PLUS_SPEED_ONLY OPT_LEVELS_3_PLUS common

GCC optimizations with O3

2020-04-22 Thread Erick Ochoa
Hello, Does anyone know if the following text from the GCC internals [0] is outdated? -O3 Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the following optimization flags: -fgcse-after-reload -fipa-cp-clone -floop-interchange -floop-