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-unroll-and-jam
-fpeel-loops
-fpredictive-commoning
-fsplit-paths
-ftree-loop-distribute-patterns
-ftree-loop-distribution
-ftree-loop-vectorize
-ftree-partial-pre
-ftree-slp-vectorize
-funswitch-loops
-fvect-cost-model
-fversion-loops-for-strides
I ask because I have an optimization pass that interacts poorly with
-O3, but compiles and runs correctly with -O2.
I'm trying to find which individual (or combination of optimizations) is
triggering the runtime error I'm debugging.
I tried running -O2 and manually enable all the optimizations turned on
by -O3 (but without specifying -O3) and my pass runs successfully.
So, either:
* -O3 does more than just enable these optimizations, or
* This documentation is outdated and there's something missing.
Does someone have an answer? (And if possible point to some code
locations so that I can learn where it is.) Thanks!
[0] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html